home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / qwez42.zip / WIND_REZ.DOC < prev   
Text File  |  1991-04-01  |  170KB  |  4,686 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                                 WINDOWS R-E-Z
  27.                                 VER. 4.20
  28.  
  29.  
  30.                                 CONNECT Software
  31.                                 6192 Fawn Meadow
  32.                                 Farmington, NY   14425
  33.  
  34.                                 Richard Magnanti
  35.                                 (716) 924-3439
  36.  
  37.                                 CPS:    71020,2040
  38.                                 GENIE:  R.MAGNANTI
  39.                                 DELPHI: MAGNANTI
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                                COPYRIGHT (c) 1988 - 1991 BY:
  57.                                CONNECT Software
  58.                                ALL RIGHTS RESERVED
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                     CONTENTS
  74.  
  75.           Differences in versions of WINDOWS R-E-Z ----------------- 1
  76.  
  77.           Important notes for BASIC 7.0/7.1 ( PDS ) users.-------- 2-3
  78.  
  79.           General overview ( list of procedures included ) ------- 4-6
  80.  
  81.           System and programming requirements ---------------------- 6
  82.  
  83.           Windowing routines ------------------------------------ 7-15
  84.                    The Active Window ------------------------------- 7
  85.              1.00  SETWIND --------------------------------------- 7-9
  86.                    SETWIND examples -------------------------------- 9
  87.              1.01  MAKEWIND ------------------------------------ 10-11
  88.              1.02  CHNGWIND ------------------------------------ 11-12
  89.              1.03  PRINTW ----------------------------------------- 12
  90.              1.04  SAVEWIND ------------------------------------ 12-13
  91.              1.05  RESAVE ----------------------------------------- 13
  92.              1.06  RSTRWIND --------------------------------------- 14
  93.              1.07  DELWIND ---------------------------------------- 14
  94.              1.08  CLRWIND ---------------------------------------- 14
  95.              1.09  NEWCOLOR ------------------------------------ 14-15
  96.              1.10  LINEW ------------------------------------------ 15
  97.              1.11  WINDSTATUS ------------------------------------- 16
  98.  
  99.           Pulldown windows ------------------------------------- 17-21
  100.              2.00  SETPULL ------------------------------------- 17-19
  101.                    SETPULL example -------------------------------- 19
  102.              2.01  PULLDOWN --------------------------------------- 20
  103.              2.02  CHNGPULL ------------------------------------ 20-21
  104.  
  105.           Scroll windows --------------------------------------- 22-30
  106.              3.00  SCRLWIND ------------------------------------ 22-25
  107.                    SCRLWIND example ( Auto-exit ) -------------- 25-26
  108.                    SCRLWIND example ( Multiple scroll windows )- 26-29
  109.              3.01  MARKED% ------------------------------------- 29-30
  110.  
  111.           Get answer routine ----------------------------------- 31-32
  112.              4.00  GETANS -------------------------------------- 31-32
  113.  
  114.           Input routines --------------------------------------- 33-42
  115.              5.00  INPTWIND ------------------------------------ 33-35
  116.              5.01  SETINPT ------------------------------------- 35-38
  117.                    SETINPT example ----------------------------- 38-39
  118.              5.02  MULTINPT ------------------------------------ 39-42
  119.                    Editing features for input routines ------------ 43
  120.  
  121.           Directory routines ----------------------------------- 44-47
  122.              6.00  GETDISK ---------------------------------------- 44
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.      Copyright (c) 1988 - 1991 By: CONNECT Software  All Rights reserved.
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.              6.01  FINDPATH --------------------------------------- 44
  140.              6.02  SETDISK ------------------------------------- 44-45
  141.              6.03  DISKSIZE --------------------------------------- 45
  142.              6.04  FINDDIR ------------------------------------- 45-47
  143.                    A directory scroll window ( example ) ------- 48-49
  144.  
  145.           Keyboard and Mouse routines -------------------------- 50-51
  146.              7.00  KEYMOUSE% -------------------------------------- 50
  147.                    KEYMOUSE% example --------------------------- 50-51
  148.              7.01  MBUTTONS --------------------------------------- 51
  149.              7.02  MOUSEON ---------------------------------------- 51
  150.  
  151.           Sound Routine ------------------------------------------- 51
  152.              8.00  DOSOUND ---------------------------------------- 51
  153.  
  154.           Program format --------------------------------------- 52-55
  155.  
  156.           Making a customized library ----------------------------- 56
  157.  
  158.           Description of files --------------------------------- 57-58
  159.  
  160.           Errors ----------------------------------------------- 59-63
  161.  
  162.           Appendix --------------------------------------------- 64-67
  163.              Color attribute chart -------------------------------- 64
  164.              Multi-field code chart ------------------------------- 65
  165.              Border designation chart ----------------------------- 66
  166.              Keymouse code values --------------------------------- 67
  167.  
  168.           Restrictions and disclaimer ----------------------------- 68
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.      Copyright (c) 1988 - 1991 By: CONNECT Software  All Rights reserved.
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                             ***************************
  206.                             *  NOTE ------ READ THIS! *
  207.                             ***************************
  208.  
  209.               The information in this documentation refers to the
  210.           enhanced version of WINDOWS R-E-Z.  Differences between the
  211.           QuickBasic ( 4.00, 4.00b and 4.50 ) and the BASIC 7.+ (PDS)
  212.           versions are detailed.  The documentation can be used for the
  213.           unenhanced versions with the following exceptions.
  214.  
  215.  
  216.               1. MULTI-FIELD INPUT SCREENS - A maximum of 2 input
  217.           screens with a maximum of 25 fields per screen are available
  218.           in the unenhanced version.  This compares to 10 multi-field
  219.           screens with up to 100 fields each, in the enhanced version.
  220.  
  221.               2. MEMORY - The code in the unenhanced libraries is not
  222.           modular.  Therefore executable programs made with the unen-
  223.           hanced libraries will contain all of the code even though
  224.           all of the procedures are not used.  This will substantially
  225.           increase the length of any executable file and program.
  226.               With the enhanced versions of WINDOWS R-E-Z, it is not
  227.           necessary to link modules to executable programs if routines
  228.           in a module are not used by the program.  Much smaller ex-
  229.           ecutable programs are consequently possible.
  230.               An additional library is included in the enhanced
  231.           versions which does not contain error checking or window
  232.           status capability.  This library can be used after the
  233.           program is de-bugged and also represents an opportunity for
  234.           considerable memory reduction.
  235.  
  236.               3. The BASIC 7.0/7.1 unenhanced version does not allow
  237.           the use of unnamed ( blank ) COMMON blocks.  The enhanced
  238.           version has provisions for the use of same.
  239.  
  240.               4. The section labeled "MAKING A CUSTOMIZED LIBRARY"
  241.           refers to the enhanced version of WINDOWS R-E-Z.
  242.  
  243.  
  244.           **********************************************************
  245.           **  For information on obtaining the enhanced version   **
  246.           **  of WINDOWS R-E-Z see the file ORDER.ME.             **
  247.           **********************************************************
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                   1                                   
  262.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                Important notes for BASIC 7.0/7.1 ( PDS ) users.
  272.  
  273.  
  274.           ENHANCED AND UNENHANCED VERSIONS:
  275.  
  276.           The /Ea option may be used when loading QBX.  This allows
  277.           the use of expanded memory.
  278.  
  279.           Window memory resides in a separate segment of string space
  280.           reserved for strings placed in unnamed ( blank ) COMMON
  281.           blocks.  DO NOT USE BLANK COMMON BLOCKS IN YOUR PROGRAM.
  282.  
  283.           EXAMPLE: COMMON SHARED A$                ' NOT PERMITTED
  284.                    COMMON SHARED /BLOCKNAME/ A$    ' PERMITTED
  285.  
  286.           Maximum window memory is 64k bytes.  Calls to MAKEWIND or
  287.           SAVEWIND requesting window memory in excess of 64k bytes
  288.           will result in an "Out of string space" error message.  As
  289.           64k represents sixteen full display windows (80 column mode)
  290.           this limitation should not be restrictive.
  291.  
  292.           The use of far strings is required.  This is the default for
  293.           programs compiled from the QBX environment.   If the source
  294.           code is compiled on the command line the /Fs option must be
  295.           used with BC.
  296.  
  297.  
  298.           ENHANCED VERSION ONLY:
  299.  
  300.           An additional object file PDSMEM70/71.OBJ is included which
  301.           allows the use of unnamed (blank) COMMON blocks. It must re-
  302.           place the object file PDSMEM.OBJ which is included in the
  303.           libraries.  Window memory will share main module string
  304.           space after this change is made.  To make this change;
  305.  
  306.           1. Make new library files. ( Save old library files! )
  307.  
  308.           LIB PDSALL70.LIB-PDSMEM.OBJ+PDSMEM70.OBJ;     ( BASIC 7.0 )
  309.           LIB PDSNER70.LIB-PDSMEM.OBJ+PDSMEM70.OBJ;     ( BASIC 7.0 )
  310.  
  311.           LIB PDSALL71.LIB-PDSMEM.OBJ+PDSMEM71.OBJ;     ( BASIC 7.1 )
  312.           LIB PDSNER71.LIB-PDSMEM.OBJ+PDSMEM71.OBJ;     ( BASIC 7.1 )
  313.  
  314.           2. Make new quick-libraries. ( Save old quick-libraries! )
  315.  
  316.           LINK/Q PDSALL70.LIB,PDSALL70.QLB,,QBXQLB.LIB; ( BASIC 7.0 )
  317.           LINK/Q PDSNER70.LIB,PDSNER70.QLB,,QBXQLB.LIB; ( BASIC 7.0 )
  318.  
  319.           LINK/Q PDSALL71.LIB,PDSALL71.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
  320.           LINK/Q PDSNER71.LIB,PDSNER71.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                   2                                   
  328.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.           UNENHANCED VERSION ONLY:
  338.  
  339.           The library in the unenhanced, BASIC 7.0/7.1, version of
  340.           WINDOWS R-E-Z  was made using BASIC 7.1.  If you are using
  341.           BASIC 7.0 the following message will appear when making
  342.           executable programs from within the QBX environment.
  343.  
  344.           LINK WARNING L4051: BRT71EFR.LIB: CANNOT FIND LIBRARY
  345.           Enter new file spec:
  346.  
  347.           Press ENTER.  The file, BRT71EFR.LIB, is not required.
  348.  
  349.           The enhanced version of WINDOWS R-E-Z supplies libraries for
  350.           the user specified version of BASIC ( version 7.0 or 7.1 ).
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                   3                                   
  394.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                             *** GENERAL OVERVIEW ***
  404.  
  405.               WINDOWS R-E-Z is a collection of QuickBASIC and assembly
  406.           routines which provide users of QuickBASIC ver. 4.00+ and
  407.           BASIC 7.0+ ( PDS ) with a complete window management system.
  408.           With WINDOWS R-E-Z users can make, save, restore, and delete
  409.           up to twenty windows.  The memory used to save windowed
  410.           areas is dynamically allocated and outside of basic's normal
  411.           data storage area leaving more room for the basic programs
  412.           data.  Windows are assigned a number from zero to twenty.
  413.  
  414.               "INPUT WINDOWS" and "MULTI-FIELD INPUT" routines are
  415.           also provided.  "INPUT WINDOWS" provide a convenient means
  416.           to prompt for, and receive an input.  "MULTI-FIELD INPUT"
  417.           allows users to define up to 10 input screens, each having up
  418.           to 100 input fields.  Numerous options are included for
  419.           input fields.
  420.  
  421.               WINDOWS R-E-Z provides users the ability to incorporate
  422.           "PULLDOWN WINDOWS", emulating those used in the QuickBASIC
  423.           programming environment, in their programs.
  424.  
  425.               Directory routines find the default drive and path, disk
  426.           size and free space, and directory listing for any path.
  427.           File size, date, time, and attributes can also be found.
  428.  
  429.               Several other routines are included which allow the use
  430.           of "GET ANSWER WINDOWS" and "SCROLL WINDOWS".   The ability
  431.           to read KEYBOARD and MOUSE input is also provided with
  432.           WINDOWS R-E-Z.
  433.  
  434.               All of the routines require a minimal amount of initial-
  435.           ization and the resulting programs present a professional
  436.           appearance.
  437.  
  438.               Unlike many other basic "add-ons", WINDOWS R-E-Z
  439.           provides extensive error detection and reporting.
  440.  
  441.           Procedures included:
  442.  
  443.             SETWIND -------- Set up routine for windowing procedures.
  444.  
  445.             MAKEWIND ------- Makes a window.  Saves windowed area to
  446.                              window memory.  The window becomes the
  447.                              "active window".
  448.  
  449.             SAVEWIND ------- Saves a screen area to window memory.
  450.  
  451.             RESAVE --------- Saves the active window.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                   4                                   
  460.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.             RSTRWIND ------- Restores a window area to the display.
  470.  
  471.             DELWIND -------- Deletes a window area from window memory.
  472.  
  473.             CHNGWIND ------- Changes the active window to another
  474.                              window.
  475.  
  476.             NEWCOLOR ------- Changes the print-to color of the active
  477.                              window for text printed by PRINTW.
  478.                              The print-to color is used by CLRWIND to
  479.                              clear the active window's interior.
  480.  
  481.             CLRWIND -------- Clears the interior of the active window.
  482.  
  483.             PRINTW --------- Prints text in the active window using
  484.                              the window's "print-to" color.
  485.  
  486.             LINEW ---------- Prints a line in the active window using
  487.                              the window's "print-to" color.
  488.  
  489.             SCRLWIND ------- Places a scrollable list in the active
  490.                              window.
  491.  
  492.             MARKED% -------- (FUNCTION) Returns position of marked
  493.                              items after a call to SCRLWIND.
  494.  
  495.             WINDSTATUS ----- Reports window memory status.
  496.  
  497.             SETPULL -------- Set up routine for pulldown windows.
  498.  
  499.             PULLDOWN ------- Makes pulldown windows.
  500.  
  501.             CHNGPULL ------- Changes the color of, and disables or
  502.                              enables an item in a pulldown window.
  503.  
  504.             INPTWIND ------- Makes an input field with an optional
  505.                              window.  The field can be edited by
  506.                              the user.
  507.  
  508.             SETINPT -------- Set up routine for multi-field input
  509.                              screens.
  510.  
  511.             MULTINPT ------- Places input fields on the screen as
  512.                              defined by a previous call to SETINPT.
  513.  
  514.             GETANS --------- Makes a get answer window or single line
  515.                              prompt.  Waits for a single key response.
  516.  
  517.             DOSOUND -------- Produces sound determined by SETWIND.
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                   5                                   
  526.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.             GETDISK -------- Returns the default disk drive.
  536.  
  537.             SETDISK -------- Sets the default disk drive.
  538.  
  539.             FINDPATH ------- Returns the default path for any drive
  540.                              ( current directory ).
  541.  
  542.             DISKSIZE ------- Returns disk size and free space.
  543.  
  544.             FINDDIR -------- Returns the directory of any drive or path
  545.                              in a string array.
  546.  
  547.             KEYMOUSE% ------ (FUNCTION) Waits for keyboard or mouse
  548.                              input, or mouse movement.  Returns a code
  549.                              for the key pressed or mouse movement.
  550.  
  551.             MBUTTONS ------- Redefines the mouse buttons.
  552.  
  553.             MOUSEON -------- Turns the mouse on, off, or disables
  554.                              movement detection.
  555.  
  556.             --------------------------------------------------------
  557.  
  558.                   ***  SYSTEM AND PROGRAMMING REQUIREMENTS ***
  559.  
  560.             COMPUTER:
  561.                IBM PC (XT or AT) or compatible computer.  One disk drive.
  562.  
  563.             VIDEO ADAPTER CARD:
  564.                MONO, CGA, EGA or VGA emulating CGA.
  565.  
  566.             PROGRAMMING LANGUAGE:
  567.                For the QB4.+ version;
  568.  
  569.                    QuickBASIC version 4.00 or greater.
  570.                     - Text mode
  571.  
  572.                For the BASIC 7.+ (PDS) version;
  573.  
  574.                    BASIC 7.0  or greater.
  575.                    - Text mode
  576.  
  577.                    - Requires use of "far strings". This is the default
  578.                      if executable programs are produced from within
  579.                      QBX.  If modules are compiled using BC on the command
  580.                      line ( outside of the QBX environment ) the /Fs option
  581.                      must be used.
  582.  
  583.             DOS: Version 2.1 or higher.
  584.  
  585.             -------------------------------------------------------
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                   6                                   
  592.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.                             USING WINDOWS R-E-Z
  601.  
  602.          THE ACTIVE WINDOW
  603.  
  604.          When a window is defined ( made ) the number assiged to it
  605.          by the programmer represents the area covered by the window.
  606.          The area is restored or deleted via it's "number".  Up to 20
  607.          window areas can be saved.  The memory used to save the
  608.          window areas is automatically managed by WINDOWS R-E-Z.
  609.  
  610.          Any time a window is made it becomes the "active" window. The
  611.          active window is used by the following routines.
  612.  
  613.               PRINTW --- Prints text in the active window.
  614.               LINEW ---- Prints a line in the active window.
  615.               SCRLWIND - Places a scrollable list in the active
  616.                          window.
  617.               CLRWIND -- Clears all text from the interior of the
  618.                          active window.
  619.               RESAVE  -- Saves the active window and any text in the
  620.                          active window.
  621.               NEWCOLOR - Changes the "print-to" color of the active
  622.                          window.
  623.  
  624.  
  625.          1.00 SETWIND (FST%,SND%,SHAD%,NOHI%,ISDOT%,ISARROW%,DFORMAT%)
  626.  
  627.               Description:   SETWIND must be called at least once in
  628.               any program using the routines in WINDOWS-R-E-Z, prior
  629.               to calling the routines.  This procedure initializes
  630.               window memory.  It also sets the default windowing
  631.               speed, sound, and window shadow color.  In addition it
  632.               determines how the pulldown window and scroll window
  633.               routines display high intensity characters and the
  634.               direction arrow.  SETWIND also determines the date
  635.               format used by input routines INPTWIND and MULTINPT.
  636.  
  637.               The first call to SETWIND initializes window memory and
  638.               sets the default parameters.  Subsequent calls to
  639.               SETWIND will not affect window memory but can be used
  640.               to change the default parameters.
  641.  
  642.               Arguments:      FST% is used to allow "fast" windowing
  643.               if a CGA video card, or emulation, is detected.  IF
  644.               FST% = 0  window routines will be slower on computers
  645.               with CGA.  If FST%  = 1 the window routines will be
  646.               "fast" on computers with CGA.  This may, however, cause
  647.               "snow" with certain CGA cards.  If a monochrome card is
  648.               detected, FST% is ignored.  All windowing is "fast".
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                   7                                   
  658.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.                                SND% determines which sound will be
  668.               generated by the routines.   If SND% = 1 a "CLICK" sound
  669.               will be generated.  If SND% = 2 will a "BEEP" sound will
  670.               be produced.  Any other value produces no sound.
  671.  
  672.                                SHAD% sets the color for window shad-
  673.               ows.  See the color attribute chart for details.  Set-
  674.               ting SHAD% to 7 works well for monochrome display while
  675.               setting SHAD% to 8 works well for color displays.
  676.  
  677.                                NOHI% determines how pulldown and
  678.               scroll window routines display high intensity "key"
  679.               characters.  If NOHI% = 0 and the key character's color
  680.               is set to a high intensity it is displayed as high
  681.               intensity.  If NOHI% = 1 high intensity "key" characters
  682.               are displayed in reverse video.  This is appropriate for
  683.               LCD displays which can not display high intensity
  684.               characters.   NOHI% affects "key" characters only.  SEE
  685.               PULLDOWN AND SCRLWIND DESCRIPTIONS.
  686.  
  687.                                ISDOT% sets a period or comma for
  688.               the decimal designator.  If ISDOT% = 1 the decimal
  689.               designator is a period.  If ISDOT% <> 1 the decimal
  690.               designator is a comma.  This is appropriate for some
  691.               users outside of the USA.
  692.  
  693.                                ISARROW% tells the pulldown and scroll
  694.               window routines to display or not display the direction
  695.               arrow on the right side of the windows.  If ISARROW% = 1
  696.               the arrow will be displayed.  If ISARROW% = 0 the arrow
  697.               will not be displayed.
  698.  
  699.                                DFORMAT% determines the valid date
  700.               format for input routines INPTWIND and MULTINPT.
  701.               DFORMAT% defaults to 1 if set outside of it's allowable
  702.               range.  The date fromat is affected by the specified
  703.               width of the input field in MULTINPT and INPTWIND.
  704.               Listed are the permissible values for DFORMAT% and the
  705.               resulting allowable date formats.
  706.  
  707.               DFORMAT%     DATE FORMAT            DATE FORMAT
  708.                            (FIELD WIDTH = 10)     (FIELD WIDTH = 8)
  709.  
  710.               1            MM-DD-YYYY             MM-DD-YY
  711.               2            MM/DD/YYYY             MM/DD/YY
  712.               3            DD-MM-YYYY             DD-MM-YY
  713.               4            DD/MM/YYYY             DD/MM/YY
  714.               5            DD.MM.YYYY             DD.MM.YY
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                   8                                   
  724.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.               NOTE: If a CLEAR statement is executed by the program
  734.               all window memory is lost.  Any window areas saved in
  735.               window memory are lost.  SETWIND must be called again
  736.               to re-initialize window memory after executing a CLEAR
  737.               statement.
  738.  
  739.          ------------------------------------------------------------
  740.          Examples of a call to SETWIND.  Use the first example if
  741.          SETWIND will be called only once in the program.  Use the
  742.          second example if SETWIND may be called several times in the
  743.          program.   In example two the call to SETWIND is placed in a
  744.          sub-routine.  This is more memory efficient than calling
  745.          SETWIND several times in the program.
  746.          ------------------------------------------------------------
  747.          Example one:  This is the easier method but the ability to
  748.          change parameters based on the user's requirements is
  749.          inhibited.
  750.  
  751.          This call sets windowing and print speed to fast, sound to
  752.          click, window shadow color to 7, no hi-intensity to no,
  753.          decimal deignator to a period, and scroll bar direction arrow
  754.          to on.  The date format is set to mm-dd-yyyy.
  755.  
  756.          CALL SETWIND(1, 1, 7, 0, 1, 1, 1)
  757.  
  758.          ------------------------------------------------------------
  759.          Example two: This method provides the ability to easily
  760.          change the parameters.  In this example the sound starts out
  761.          as a "click" but is changed to a "beep" by the program
  762.  
  763.          FAST% = 1: SND% = 1: SHAD% = 7
  764.          NOHI% = 0: ISDOT% = 1: ISARROW% = 1: DFORMAT%=1
  765.  
  766.          GOSUB SETITUP       ' Initial call to SETWIND
  767.  
  768.          'program
  769.          'Now turn the sound to "beep".
  770.  
  771.          SND% = 2
  772.          GOSUB SETITUP       ' 2nd call to SETWIND
  773.  
  774.          'program
  775.          CALL DOSOUND
  776.          END
  777.  
  778.          SETITUP:
  779.          CALL SETWIND(FAST%,SND%,SHAD%,NOHI%,ISDOT%,ISARROW%,DFORMAT%)
  780.          RETURN
  781.          -------------------------------------------------------------
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                   9                                   
  790.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.          1.01 MAKEWIND (W%, LABEL$, TR%, LC%, WIDE%, NR%, ATTR%, BORBER%)
  800.  
  801.               Description:   Makes a window.  May also save a window-
  802.               ed area to window memory.  The window becomes the active
  803.               window.   Calls to PRINTW, LINEW, SCRLWIND, CLRWIND,
  804.               RESAVE, and NEWCOLOR refer to the active window.
  805.  
  806.               Arguments:   W% is the window number and must equal 0 to
  807.               20.  If W% = 0 the area under the window is not saved.
  808.               A window is simply made.  If W% is from 1 to 20 the area
  809.               under the window is saved and may be restored at a later
  810.               time via a call to RSTRWIND.  If W% is the number of a
  811.               window area previously saved by MAKEWIND or SAVEWIND an
  812.               error is reported.
  813.  
  814.                            LABEL$ is the text printed on the top
  815.               border or in the title box (see BORDER%) of the window.
  816.               By default the print starts on the second column.  If
  817.               the left character of LABEL$ ="@" the text will be
  818.               centered.  If LABEL$ is too long it will be truncated to
  819.               fit on the top border or in the title box.
  820.  
  821.                            TR% is the top row of the window.  If TR% =
  822.               100 the window will be centered from top to bottom.  TR%
  823.               can range from 1 to 23 or may equal 100.  Any other
  824.               value for TR% will result in a error.
  825.  
  826.                            LC% is the left column position of the win-
  827.               dow. If LC% = 100 the window will be centered from left
  828.               to right.  LC% can range from 1 to 78 if the display
  829.               width is 80 or from 1 to 38 if the display width is 40.
  830.  
  831.                            WIDE% is the window's width.  WIDE% must be
  832.               greater than 2.  WIDE% + LC% -1 must not be greater than
  833.               the displays width ( 40 or 80 ).
  834.  
  835.                            NR% is the number of rows in the window and
  836.               must be greater than 2.  NR% + TR% must not be greater
  837.               than 26.  If NR% is less than 5 a window title box is
  838.               not permitted.
  839.  
  840.                            ATTR% is the window's color and may be in
  841.               the range of 0 to 255.  The foreground ( window's label
  842.               and border ) color equals ATTR% MOD 16.  The background
  843.               color equals INT( ATTR% / 16 ). If the background color
  844.               is greater than 7 the foreground flashes and the back-
  845.               ground color equals background color - 8. If the fore-
  846.               ground and background colors are the same the border and
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                   10                                  
  856.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.               label will not be visible. ( SEE THE COLOR ATTRIBUTE
  865.               CHART.)  ATTR% becomes the print-to color for window W%.
  866.  
  867.                            BORDER% sets the window's border and shadow
  868.               and can be up to 3 digits in length.
  869.  
  870.               DIGIT    =    #3  #2  #1
  871.               Example   =    1   1   1   ( 111 )
  872.  
  873.  
  874.               Digit #1 sets the border.
  875.  
  876.                      0 = No border
  877.                      1 = Single line border
  878.                      2 = Double line border
  879.  
  880.  
  881.               Digit #2 sets the shadow.
  882.  
  883.                      0 = No shadow
  884.                      1 = Right/Bottom shadow
  885.                      2 = Left/Bottom shadow
  886.                      3 = Left/Top shadow
  887.                      4 = Right/top Shadow
  888.  
  889.  
  890.               Digit #3 set the title box.
  891.  
  892.                      0 = No title box
  893.                      1 = title box
  894.  
  895.               The example (111) has a 1 for each digit.  The window
  896.               will has a single lined border, a shadow on the right
  897.               and bottom and a title box
  898.  
  899.               NOTE:  If BORDER% is 100 or greater and the number of
  900.               rows (NR%) is less than 5 title boxes are not permitted.
  901.               ( SEE THE BORDER DESIGNATION CHART IN THE APPENDIX FOR
  902.               FURTHER DETAILS.)
  903.  
  904.  
  905.          1.02 CHNGWIND (W%)
  906.  
  907.               Description:  Makes window (W%) the active window.
  908.               W% must represent a window area in window memory.
  909.  
  910.               Argument:   W% is the window number.  It must range from
  911.               0 to 20.  If W% does not represent a window saved by a
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.                                   11                                  
  922.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.               previous call to MAKEWIND, CHNGWIND reports an error.
  931.  
  932.               NOTE:  W% CAN NOT REPRESENT A WINDOW SAVED BY "SAVEWIND".
  933.               IT MUST REPRESENT A WINDOW SAVED BY "MAKEWIND".
  934.  
  935.  
  936.          1.03 PRINTW (TEXT$, R%, LC%)
  937.  
  938.               Description:   Prints text to the active window.  Care
  939.               must be used to assure the active window is visible
  940.               as PRINTW will print predicated on the coordinates of
  941.               the active window regardless of it's visibility.  It is
  942.               advisable, therefore, to print to a window immediately
  943.               after it is made the active window. The text's color
  944.               will be the print-to color of the active window.  If
  945.               no window is active when PRINTW is called an error will
  946.               be reported.
  947.  
  948.               Arguments:   TEXT$ is the text to be printed.
  949.  
  950.                            R% is the row in the window were the text
  951.               will print .  If R%=1 the text will print in the first
  952.               row below the border or title box. PRINTW may be used to
  953.               print a label in the bottom border of the window by
  954.               setting R% to the number or rows in the active window
  955.               minus 1 ( minus 3 if a title box was specified ).  An
  956.               invalid value for R% will result in a reported error.
  957.  
  958.                            LC% is the left column where TEXT$ starts
  959.               printing.  If LC%=100 the text will be centered left to
  960.               right.  IF LC% plus the length of TEXT$ is greater than
  961.               the windows width minus 2 an error will be reported.
  962.  
  963.  
  964.          1.04 SAVEWIND (W%, TR%, LC%, WIDE%, NR%)
  965.  
  966.               Description:   Saves a portion of the screen in window
  967.               memory.  This procedure is the same as MAKEWIND except
  968.               no window is made.  The area designated by the arguments
  969.               is saved.  If the number assigned to W% represents a
  970.               window area previously saved by MAKEWIND or SAVEWIND an
  971.               error is reported.  An area saved via SAVEWIND can be
  972.               "popped" to the screen at appropriate times during
  973.               program execution by RSTRWIND ( see description ). A
  974.               screen area saved by SAVEWIND DOES NOT BECOME THE
  975.               ACTIVE WINDOW.  SAVEWIND differs from RESAVE in that it
  976.               saves an area of the screen specified by it's
  977.               arguments. RESAVE saves the area of the screen as
  978.               designated by the coordinates of the active window.
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.                                   12                                  
  988.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.               Arguments:  W% must range from 1 to 20.
  998.  
  999.                           See MAKEWIND for a description of the
  1000.               remaining arguments.
  1001.  
  1002.  
  1003.          1.05 RESAVE
  1004.  
  1005.               Description:   Saves the active window, it's interior,
  1006.               and shadow.  As window number 0 can not be saved the
  1007.               active window can not be window number 0.  If there is
  1008.               no active window or window number 0 is active when
  1009.               RESAVE is called an error will be reported.
  1010.  
  1011.               The screen area saved under the active window is removed
  1012.               from window memory and replaced with the active window
  1013.               and it's interior.   After complex screens are made in
  1014.               the active window's interior, RSAVE can be used to save
  1015.               them.   They can be restored to the screen using
  1016.               RSTRWIND.  Use RESAVE immediately after a window is made
  1017.               and it's interior is filled as  RESAVE will save the
  1018.               area of the screen determined by the active window's
  1019.               coordinates, even if it is not visible.
  1020.  
  1021.               Use RESAVE as follows;
  1022.  
  1023.               1. Make a window number 1 to 20 via a call to MAKEWIND.
  1024.                  This becomes the active window.
  1025.  
  1026.               2. Print in the window using PRINTW.  Additional windows
  1027.                  may also be printed in the window.  Use window number
  1028.                  0 to make the additional windows, as the screen area
  1029.                  under them need not be saved.
  1030.  
  1031.               3. Call CHNGWIND to make the window number used in step
  1032.                  1 the active window.  ( Only required if additional
  1033.                  windows were made inside the original window. )
  1034.  
  1035.               4. Call RESAVE to save active window.
  1036.  
  1037.               5. Use RSTRWIND to "pop" the window and it's interior on
  1038.                  the screen any time during program execution.
  1039.  
  1040.               6. After the window is restored to the screen it may be
  1041.                  printed in again provided it is the active window.
  1042.                  This may require a call to CHNGWIND.
  1043.  
  1044.               Arguments:   None.
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.                                   13                                  
  1054.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.          1.06 RSTRWIND (W%, DELFLAG%)
  1065.  
  1066.               Description:   Restores a window area previously saved
  1067.               by MAKEWIND, SAVEWIND or RESAVE.  The window area (W%)
  1068.               must exist in window memory or RSTRWIND does nothing.
  1069.  
  1070.               Arguments:     W% is the number ( 1 to 20 ) assigned to
  1071.               the saved window area to be restored to the screen.  The
  1072.               window area is returned to it's original coordinates.
  1073.  
  1074.                              DELFLAG% is set to zero  to keep the
  1075.               windowed area in window memory.  If the DELFLAG% is not
  1076.               zero the saved window area (W%) is deleted from window
  1077.               memory. If W% was the active window an active window
  1078.               will no longer exist.
  1079.  
  1080.  
  1081.          1.07 DELWIND (W%)
  1082.  
  1083.               Description:   Deletes a saved window area (W%) from
  1084.               window memory, if it exists in window memory.  If the
  1085.               window is the active window an active window will no
  1086.               longer exist.
  1087.  
  1088.               Argument:      W% is the window area number.
  1089.  
  1090.  
  1091.          1.08 CLRWIND
  1092.  
  1093.               Description:   Clears the interior of the active window.
  1094.               Care must be taken to assure that active window is
  1095.               visible as CLRWIND clears the area of the screen
  1096.               designated as the interior of the active window regard-
  1097.               less of the window's visibility.  The window will be
  1098.               cleared with it's print-to color.  If no window is
  1099.               active when CLRWIND is called, an error is reported.
  1100.  
  1101.               Arguments:     None
  1102.  
  1103.  
  1104.          1.09 NEWCOLOR ( ATTR% )
  1105.  
  1106.               Description:   Changes the print-to color of the active
  1107.               window.  Text printed in the window by PRINTW or lines
  1108.               printed in the window by LINEW will assume the new color
  1109.               specified by this routine.  If the active window is
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                                   14                                  
  1120.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.               cleared via a call to CLRWIND, it's interior will be
  1129.               cleared with the color specified by NEWCOLOR.  The color
  1130.               designation will be retained and used by subsequent
  1131.               calls to PRINTW or LINEW for the window which was active
  1132.               when NEWCOLOR was called.  If no window is active when
  1133.               NEWCOLOR is called, an error is reported.
  1134.  
  1135.               Argument:      ATTR% is the new color attribute.  SEE
  1136.               THE COLOR ATTRIBUTE CHART.
  1137.  
  1138.  
  1139.  
  1140.          1.10 LINEW ( ROW%, TYP% )
  1141.  
  1142.               Description:   Prints, or erases a line in the active
  1143.               window.  If an active window does not exist an error is
  1144.               reported. The line will assume the print-to color of the
  1145.               active window.  As the border characters are changed
  1146.               when a line is printed, the color of the border
  1147.               characters may change also.  This will occur if the
  1148.               print-to color is not the same as the color of the
  1149.               border characters in the active window.
  1150.  
  1151.               Arguments:     ROW% is the row, of the interior, of the
  1152.               active window where a line will print.  If ROW% < 1 or
  1153.               ROW% greater then the number of rows in the interior of
  1154.               the active window an error will be reported.
  1155.  
  1156.                              TYP% is the type of line which will print
  1157.               and may be as follows;
  1158.  
  1159.  
  1160.                       TYP%               Line type
  1161.                         1                Single line
  1162.                         2                Double line
  1163.                         0                Erases a line and returns
  1164.                                          normal border characters.
  1165.                         Other values     Defaults to single line.
  1166.  
  1167.  
  1168.               NOTE: IF TYP% = 0 ANY TEXT ON THE LINE IN THE WINDOW,
  1169.               POSITIONED IN ROW, ROW% WILL BE ERASED.
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.                                   15                                  
  1186.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.          1.11 WINDSTATUS
  1196.  
  1197.               Description:   This is a programming tool.  Calling
  1198.               WINDSTATUS reports each window's number, top row, left
  1199.               column, width, number of rows, and attribute (color).
  1200.               The attribute refers to the original attribute specified
  1201.               by the call to MAKEWIND for each window.  If the
  1202.               attribute is "SAVED" the window area was saved by a call
  1203.               to SAVEWIND, not MAKEWIND.  WINDSTATUS also reports the
  1204.               active window and total window memory used to save
  1205.               window areas.   Window number zero does not use window
  1206.               memory as the area under it is not saved.  To use
  1207.               WINDSTATUS place a call to WINDSTATUS in the program at
  1208.               the location where it is desireable to view each windows
  1209.               parameters.  The program will terminate and must be
  1210.               restarted.  First remove the call to WINDSTATUS.
  1211.  
  1212.               Arguments:   None.
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.                                   16                                  
  1252.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.                         ***** PULLDOWN WINDOWS *****
  1262.  
  1263.          These procedures generate a maximum of 10 pulldown windows
  1264.          with a maximum of 20 items ( lines ) in each window.  The
  1265.          area covered by the pulldown windows is saved  and restored
  1266.          as the window moves from one menubar item to the next.
  1267.          Unlike the other windowing procedures pulldown windows will
  1268.          only work in the 80 column display width mode.  To select a
  1269.          menubar item the ARROW keys can be used or the first letter
  1270.          of the menubar item may be pressed.  To select an item from
  1271.          any of the pulldown windows the ARROW keys, or "KEY CHAR-
  1272.          ACTER" for the item may be pressed.  If the ARROW keys are
  1273.          used the ENTER or RETURN key must be pressed to finalize the
  1274.          selection.  If a letter is pressed, and it is found, the
  1275.          procedure is automatically exited without the need to press
  1276.          the ENTER or RETURN keys.  The ESC key always exits.
  1277.  
  1278.  
  1279.          2.00 SETPULL (TR%, LC% , WD%, BAR$, PWIND$())
  1280.  
  1281.               Description: Must be called to set up the routine
  1282.               PULLDOWN.  Call SETPULL only once at the beginning of
  1283.               each program using pulldown windows.
  1284.  
  1285.               Arguments:   TR% is the top row position of the menubar.
  1286.               It must range from 1 to 21.  If the top row position of
  1287.               the menubar is set too low not allowing a pulldown window
  1288.               to fit on the display an error will be reported ( WINDOW
  1289.               WON'T FIT or SHADOW WON'T FIT ) when the pulldown window
  1290.               is accessed.
  1291.  
  1292.                            LC% is the left column position of the
  1293.               menubar.  It must range from 1 to 73.  If the left column
  1294.               position of the menubar is set too high not allowing a
  1295.               pulldown window to fit on the display an error will be
  1296.               reported ( WINDOW WON'T FIT or SHADOW WON'T FIT ) when
  1297.               the pulldown window is accessed.
  1298.  
  1299.                            WD% is the width of the menubar.  WD% is
  1300.               self adjusting if it is set outside of the permissible
  1301.               range.  The maximum width of the menubar is 81 - LC%.
  1302.               The minimum width of the menubar equals the width of the
  1303.               individuals items in the menubar plus two spaces between
  1304.               each item plus two preceding spaces and one trailing
  1305.               space.  If WD% is set too low it self adjusts to the
  1306.               minimum width.  If it is set too high it self adjusts to
  1307.               the maximum width.  WD% only changes the length, by
  1308.               adding trailing spaces to the menubar, if it is greater
  1309.               then the minimum width and less then or equal to the
  1310.               maximum width of the menubar.
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.                                   17                                  
  1318.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.                            BAR$ is the menubar.  If BAR$ = "THIS IS A
  1328.               SAMPLE" the menubar is; THIS  IS  A  SAMPLE.  Two spaces
  1329.               are placed between each menubar item ( THIS, IS, A,
  1330.               SAMPLE ).  Two spaces are added two the front of the
  1331.               menubar and one space is added to the end of the menubar.
  1332.               The maximum length of the menubar is 80 characters
  1333.               including the spaces.  No more than 10 menubar items are
  1334.               permitted.  Error detection checks for the menubar length
  1335.               and number of items.
  1336.  
  1337.                            PWIND$() is an array containing  all of
  1338.               the strings representing the items in each pulldown
  1339.               window.  PWIND$() must be in the correct format. ( SEE:
  1340.               EXAMPLE OF A CALL TO SETPULL ).  The last item in each
  1341.               pulldown window must be followed by a "***" in PWIND$().
  1342.               "ENDPULL" in PWIND$() marks the end of all pulldown
  1343.               windows.  PWIND$(1) must be the first string in the
  1344.               array, NOT PWIND$(0).
  1345.  
  1346.               Each selectable item in PWIND$() has a "KEY CHARACTER".
  1347.               The key character is the character which is searched for
  1348.               when a key is pressed while in the PULLDOWN enviornment.
  1349.               The key character defaults to the first character in
  1350.               each item.  To designate the key character as a
  1351.               different character follow the character with a "@".
  1352.  
  1353.               EXAMPLE:
  1354.               PWIND$(1) = "Get File"        ( Key character = "G")
  1355.               PWIND$(2) = "Save F@ile"      ( Key character = "F")
  1356.  
  1357.               The "@" will not be displayed when the string is printed
  1358.               in the pulldown window.  The description for KEYATTR%
  1359.               for the routine PULLDOWN describes how to make the key
  1360.               character a different color, or high intensity, enabling
  1361.               users to distinguish it as the key character.
  1362.  
  1363.               NOTE: DO NOT PLACE THE "@" IN POSITION ONE OR TWO OF THE
  1364.               STRING AS IT WILL PRINT IN THE PULLDOWN WINDOW.  AS
  1365.               STATED THE KEY CHARACTER WILL DEFAULT TO POSITION ONE IF
  1366.               THE "@" IS OMITTED FROM THE STRING.  THIS ELIMINATES THE
  1367.               NEED TO PLACE THE "@" IN POSITION TWO.
  1368.  
  1369.               If an element of PWIND$() = "-" and it is not the first
  1370.               or last item in a pulldown window it will segment the
  1371.               pulldown window by placing a line across the width of it.
  1372.               If the "-" is the first or last item in the pulldown
  1373.               window it will print as a "-".
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.                                   18                                  
  1384.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.               EXAMPLE:  PWIND$(3) = "-"   Providing PWIND$(3) is not
  1394.                         last item in the pulldown window PWIND$(3) will
  1395.                         print as a line across the window.
  1396.  
  1397.               --------------------------------------------------------
  1398.               EXAMPLE OF A CALL TO SETPULL
  1399.  
  1400.               BAR$ = "THIS IS A SAMPLE"     'MENUBAR STRING DEFINED.
  1401.               N%=20                         'USE THIS METHOD SO
  1402.               DIM PWIND$(N%)                'PWIND$() IS DYNAMIC.
  1403.                                             'DON'T USE DIM PWIND$(20)
  1404.               TEMP%=0
  1405.               WHILE PWIND$(TEMP%) <> "ENDPULL"
  1406.                  TEMP% = TEMP% + 1            'TEMP% MUST START WITH 1.
  1407.                  READ PWIND$(TEMP%)           'READ PULLDOWN WINDOW
  1408.               WEND                            'DATA.
  1409.               TR%=1: LC%=1: WD%=80
  1410.  
  1411.               CALL SETPULL (TR%, LC%, WD% BAR$, PWIND$())  'SET PULLDOWN
  1412.               ERASE PWIND$                    'COMPLETELY ERASES PWIND$()
  1413.                                               'IF IT IS DYNAMIC.
  1414.               DATA HELLO, JOE,***        :' WINDOW #1
  1415.  
  1416.               DATA HOW, ARE, -, YOU,***  :' WINDOW #2 LINE IN ROW 3
  1417.  
  1418.               DATA I,AM@,FINE,***   :'#3 - "M" = KEY CHARACTER FOR "AM"
  1419.  
  1420.               DATA BYE,***          :'#4 - ONE ITEM.
  1421.               DATA ENDPULL          :'END OF DATA ( CASE SENSITIVE )
  1422.               --------------------------------------------------------
  1423.  
  1424.               First the menubar is defined, then an array is dimen-
  1425.               sioned to hold the pulldown window's data. This is only
  1426.               a temporary array to hold the data and is erased after
  1427.               SETPULL is called.  The data is then read.  The "***"
  1428.               signals the end of each pulldown window and MUST be
  1429.               entered exactly as shown. The "ENDPULL" signals the end
  1430.               for all pulldown windows and MUST be the last data item
  1431.               read. If the format is not exactly as shown an error
  1432.               will be reported or the windows will not be as expected.
  1433.               In the example shown the first menubar item is "THIS".
  1434.               It's associated pulldown window contains the two items
  1435.               "HELLO" and "JOE".  The last menubar item is "SAMPLE"
  1436.               and it's pulldown window contains one item "BYE". The
  1437.               menubar is located on line 1, column 1 ( TR%=1 and
  1438.               LC% = 1 ). It occupies the entire row as WD% = 80.
  1439.  
  1440.               NOTE: THE DATA MUST BE IN THE FORMAT SHOWN.  THE CHAR-
  1441.               ACTERS "***" MARK THE END OF EACH INDIVIDUAL WINDOW AND
  1442.               THE WORD "ENDPULL" MARKS THE END OF ALL PULLDOWN WINDOWS.
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.                                   19                                  
  1450.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.          2.01 PULLDOWN (MENUBAR%, WINDITEM%, ATTR%, KEYATTR%, BORDER%)
  1460.  
  1461.               Description: Places the menubar on line one.  Places
  1462.               the user in the pulldown window environment.
  1463.  
  1464.               Arguments:   MENUBAR% is the sequential number ( left
  1465.               to right ) of selected menubar item . It is returned to
  1466.               the calling procedure (PULLDOWN).  If the second item in
  1467.               the menubar is selected, MENUBAR% will equal two. If the
  1468.               ESC key is pressed MENUBAR% = 0.
  1469.  
  1470.                            WINDITEM% represents the row number of the
  1471.               selected pulldown window item.  It is returned to the
  1472.                calling procedure.  If the ESC key is pressed WINDITEM%
  1473.               = 0.
  1474.  
  1475.               NOTE:  A LINE IN A PULLDOWN WINDOW OCCUPIES A ROW
  1476.               POSITION.
  1477.  
  1478.                            ATTR% is the color.  It follows the same
  1479.               rules as described in MAKEWIND except a flashing
  1480.               foreground is not permitted. Any value over 127 is
  1481.               changed to ATTR% MOD 128.
  1482.  
  1483.                            KEYATTR% is the color of the key character
  1484.               for each item in the pulldown windows.  If KEYATTR% = 0
  1485.               the key character will be the same color as the other
  1486.               characters in each window item.  This would be
  1487.               appropriate if the first character in each item is
  1488.               ALWAYS the key character. Setting KEYATTR% to a
  1489.               different color, or high intensity, allows users to
  1490.               distinguish the character as the key character for each
  1491.               item in the list.  Any value for KEYATTR% over 127 is
  1492.               changed to KEYATTR% MOD 128.
  1493.  
  1494.                            BORDER% is the pulldown window's border
  1495.               designation. BORDER% can be 0,1,2,10,11 or 12 for
  1496.               pulldown windows. Any other value for BORDER% will
  1497.               result in an error. SEE THE BORDER DESIGNATION CHART.
  1498.  
  1499.  
  1500.          2.02 CHNGPULL ( BARITEM%, WINDITEM%, ATTR% )
  1501.  
  1502.               Description: Changes the color of an item in a pulldown
  1503.               window.  Also disables or enables the ability to select
  1504.               the item.
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.                                   20                                  
  1516.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.               Arguments:   BARITEM% is the sequential number ( left
  1526.               to right ) of the menubar selection associated with the
  1527.               item's pulldown window.
  1528.  
  1529.                            WINDITEM% is the row position of the item
  1530.               in the pulldown window's interior.
  1531.  
  1532.               NOTE:  A LINE IN A PULLDOWN WINDOW OCCUPIES A ROW
  1533.               POSITION.
  1534.  
  1535.                            ATTR% serves two purposes.
  1536.  
  1537.               If ATTR% > 0 it changes the color of the item
  1538.               specified by BARITEM% and WINDITEM% to ATTR% ( SEE THE
  1539.               COLOR ATTRIBUTE CHART ). The key character in the item
  1540.               also assumes the color specified by ATTR%.  The ability
  1541.               to select the item from the pulldown window is disabled.
  1542.               Any value for ATTR% over 127 is changed to ATTR% MOD
  1543.               128.
  1544.  
  1545.               If ATTR% = 0 the color of the item, and it's key char-
  1546.               acter is returned to it's original status as defined in
  1547.               the original call to PULLDOWN.  The ability to select
  1548.               the item is enabled.
  1549.  
  1550.               NOTE: Call CHNGPULL after the call to SETPULL for the
  1551.               pulldown windows.  Calls to CHNGPULL prior to the call
  1552.               for SETPULL will have no effect on the pulldown windows.
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.                                   21                                  
  1582.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.                          ***** SCROLL WINDOWS *****
  1592.  
  1593.          SCRLWIND places a scrollable list in the active window.
  1594.          A highlight ( scroll ) bar is placed over a specified item in
  1595.          the list and can be moved by the user via the UP and DOWN
  1596.          ARROW keys.  Pressing the ENTER key returns the sequential
  1597.          item number covered by the scroll bar.  The HOME, END, PG UP,
  1598.          and PG DN keys move the scroll bar as indicated.  SCRLWIND
  1599.          searches from the position of the scroll bar to the last item
  1600.          in the window  ( list ) to see if the key pressed is the KEY
  1601.          CHARACTER of any element of the list. If a match is found the
  1602.          scroll bar moves to that position in the list.
  1603.  
  1604.          3.00 SCRLWIND (LIST$(), ENTRIES%, KIND$, RTRN%, KEYATTR%)
  1605.  
  1606.               Description: Places a list ( LIST$() ) in the active
  1607.               window.  The list is ENTRIES% long.
  1608.  
  1609.               Arguments:   LIST$() is the array holding the strings to
  1610.               be placed in the scroll window.  Each element of the
  1611.               array is a line in the scroll window.  If the length of
  1612.               any element is greater then the width of the window - 4
  1613.               an error is reported. LIST$(1) must be the first string
  1614.               in the array, NOT LIST$(0).
  1615.  
  1616.               Each selectable item in LIST$() has a "KEY CHARACTER".
  1617.               The key character is the character which is searched for
  1618.               when a key is pressed while in the SCRLWIND enviornment.
  1619.               The key character defaults to the first character in
  1620.               each item.  To designate the key character as a
  1621.               different character follow the character with a "@" in
  1622.               the string.
  1623.  
  1624.               EXAMPLE: LIST$(1) = "Get File"  ( Key character = "G")
  1625.                        LIST$(2) = "Save F@ile"( Key character = "F")
  1626.  
  1627.               The "@" will not be displayed when the string is printed
  1628.               in the scroll window.  The description for KEYATTR% for
  1629.               this routine describes how to make the key character a
  1630.               different color, or high intensity, enabling users to
  1631.               distinguish it as the key character.
  1632.  
  1633.               NOTE: DO NOT PLACE THE "@" IN POSITION ONE OR TWO OF THE
  1634.               STRING AS IT WILL PRINT IN THE SCROLL WINDOW.  AS STATED
  1635.               THE KEY CHARACTER WILL DEFAULT TO POSITION ONE IF THE
  1636.               "@" IS OMITTED FROM THE STRING.  THIS ELIMINATES THE
  1637.               NEED TO PLACE THE "@" IN POSITION TWO.
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.                                   22                                  
  1648.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.               If an element of LIST$() = "-" and it is not the first
  1658.               item in the list or the last item in the list and all of
  1659.               the items in LIST$() will fit in the window's interior
  1660.               the scroll window will be segmented.  A line will print
  1661.               across the window as determined by the position of the
  1662.               "-" in LIST$().  If the previous conditions are not met
  1663.               the string will print as a "-".
  1664.  
  1665.               EXAMPLE:  LIST$(2) = "-"  ( Provided LIST$(2) is not
  1666.                         the last item in the list and the number of
  1667.                         interior rows in the window is greater than
  1668.                         two, LIST$(2) will print as a line.)
  1669.  
  1670.                            ENTRIES% is the number of elements in the
  1671.               array ( LIST$() ) to use in the scroll window .
  1672.  
  1673.                            KIND$ is as follows;
  1674.  
  1675.               IF KIND$ = "A" when entering SCRLWIND the scroll window
  1676.               is an "AUTO-EXIT" scroll window. If the key pressed
  1677.               equals the key character of an item in the scroll window
  1678.               and the item is between the scroll bar and the end of the
  1679.               list the routine will automatically exit. The position
  1680.               of the selected item in LIST$() will be returned in
  1681.               RTRN%.  If RTRN% = 2, LIST$(2) was selected.
  1682.  
  1683.               IF KIND$ ="M" when entering SCRLWIND the scroll window is
  1684.               a "MARK" scroll window.  Pressing the <+> or INSERT key
  1685.               marks the item covered by the scroll bar.  A right arrow
  1686.               is printed to the left of the item in the scroll window
  1687.               to signify it has been marked.  Pressing the <-> or
  1688.               DELETE key un-marks an item if it was marked.  Striking
  1689.               the PRINT key or space bar marks all items, unless they
  1690.               were all previously marked, in which case the PRINT key
  1691.               or space bar will unmark all items.  Pressing the ENTER
  1692.               or RETURN key returns a coded string in KIND$ which
  1693.               represents the marked items.  If KIND$ ="" no items were
  1694.               marked.  If any items were marked KIND$ will be ENTRIES%
  1695.               long.  Each character in KIND$ will correspond to an
  1696.               element in LIST$().  If the first character of KIND$=" ",
  1697.               LIST$(1) was not marked. If the second character, in
  1698.               KIND$ = CHR$(26), LIST$(2) was marked.  Each un-marked
  1699.               element of LIST$() will have a corresponding space (" ")
  1700.               in KIND$ while each marked element will have a
  1701.               corresponding right arrow ( CHR$(26) ) in KIND$.  See the
  1702.               description for the function MARKED% for a method of
  1703.               decoding KIND$.
  1704.  
  1705.               IF KIND$ = "S" when entering SCRLWIND the scroll window
  1706.               is a "SINGLE MARK" scroll window. Provided there is more
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.                                   23                                  
  1714.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.               than one item ( ENTRIES% > 1 ) in the scroll window, one
  1723.               item will be marked as in the preceding example for a
  1724.               "MARK" scroll window.  Only one item can be marked,
  1725.               however.  The marked item follows the scroll bar.
  1726.               Pressing TAB, ENTER, RETURN or ECS will exit the scroll
  1727.               window.  If TAB, ENTER or RETURN is pressed the selected
  1728.               item number is returned in RTRN%.  If the scroll bar is
  1729.               over LIST$(2), RTRN% = 2.  If ESC is pressed RTRN% = 0.
  1730.  
  1731.               SINGLE MARK scroll windows with one entry ( ENTRIES%=1 )
  1732.               do not mark the item.  RTRN% = 1 if ENTER or RETURN is
  1733.               pressed. RTRN% = 0 if ESC is pressed and RTRN% = -1 if
  1734.               TAB is pressed.  These scroll windows can be used as
  1735.               <OK>, <CANCEL>, <ABORT> etc... scroll windows.
  1736.  
  1737.               NOTE: SEE THE SECTION LABELED "Multiple Scroll Windows"
  1738.               TO SEE HOW SINGLE MARK SCROLL WINDOWS CAN BE USED TO
  1739.               DISPLAY AND USE SEVERAL SCROLL WINDOWS AT ONE TIME.
  1740.  
  1741.               IF KIND$ = "V" the scroll window is "VIEW ONLY".  The
  1742.               window will be filled with the strings in LIST$() and the
  1743.               routine will be exited.
  1744.  
  1745.               IF KIND$ = "SV" the scroll window is "VIEW ONLY - SINGLE
  1746.               MARK" scroll window.  The window will be filled with the
  1747.               strings in LIST$().  If ENTRIES% > 1 the item designated
  1748.               by the value of RTRN% will be marked. ( See description
  1749.               for RTRN%. )
  1750.  
  1751.               Any other value for KIND$ when entering SCRLWIND results
  1752.               in a "REGULAR" scroll window. After the scroll bar
  1753.               is moved to the selected item, pressing the ENTER or
  1754.               RETURN key returns the selected item in RTRN%.
  1755.  
  1756.                            RTRN% serves two purposes. One is to place
  1757.               the scroll bar over a the item specified by RTRN% when
  1758.               entering SCRLWIND.  If RTRN% < 1 or RTRN% > ENTRIES%,
  1759.               RTRN% defaults to 1 and the scroll bar will be positioned
  1760.               over the first item in the window.
  1761.  
  1762.               EXAMPLE: RTRN% = 2  ( If there are a minimum of two
  1763.               items in the scroll window ( ENTRIES% > 1 ) the scroll
  1764.               bar will be over LIST$(2) when entering SCRLWIND. )
  1765.  
  1766.               RTRN% also returns the selected item when exiting
  1767.               SCRLWIND.  If RTRN% = 2, LIST$(2) was selected.  IF ECS
  1768.               is pressed to exit SCRLWIND, RTRN% = 0.  If TAB is
  1769.               pressed and the scroll window is a "SINGLE MARK" scroll
  1770.               window with over one entry, RTRN% returns the selected
  1771.               item.  If the scroll window is a "SINGLE MARK" scroll
  1772.               window with one entry and TAB is pressed, RTRN% = -1.
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.                                   24                                  
  1780.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.               NOTE: THE ITEM SELECTED IN LIST$() ( AS INDICTED BY THE
  1790.               VALUE OF RTRN% ) MAY CONTAIN A "@" TO INDICATE THE KEY
  1791.               CHARACTER.  IF IT IS NESESSARY TO PRINT THE ITEM THE "@"
  1792.               CAN BE REMOVED FROM IT USING THE FOLLOWING FUNCTION.
  1793.  
  1794.               ' FUNCTIONS MUST BE DECLARED.  RTRN% = ITEM # SELECTED
  1795.               ' FROM LIST$().
  1796.  
  1797.               DECLARE FUNCTION NO$( ITEM$ )
  1798.               '( Place this at the start of the module.)
  1799.  
  1800.               ' IF RTRN% = 2 AND LIST$(RTRN%) = "Save F@ile", LIST$(2)
  1801.               ' CAN BE PRINTED AS "Save File" as follows.
  1802.  
  1803.               PRINT NO$( LIST$(RTRN%) )
  1804.  
  1805.  
  1806.               ' INCLUDE THIS FUNCTION IN YOUR PROGRAM
  1807.  
  1808.               FUNCTION NO$ ( ITEM$ )
  1809.                 A% = INSTR ( ITEM$, "@" )
  1810.                 IF A% < 3 THEN        '"@" SHOULD NOT BE IN POSITION
  1811.                    NO$ = ITEM$       ' 1 OR 2, OR NO "@" IN ITEM$.
  1812.                 ELSE
  1813.                    NO$ = LEFT$(ITEM$, A% - 1) + MID$(ITEM$, A% + 1)
  1814.                 END IF
  1815.               END FUNCTION
  1816.  
  1817.  
  1818.                            KEYATTR% is the color of the key character
  1819.               for each item in the scroll window.  If KEYATTR% = 0
  1820.               the key character will be the same color as the other
  1821.               characters for each window item.  This would be
  1822.               appropriate if the first charcter in each item is ALWAYS
  1823.               the key character.   Setting KEYATTR% to a different
  1824.               color, or high intensity, allows users to distinguish the
  1825.               character as the the key character for each item in the
  1826.               list.  KEYATTR% has no effect on the background color of
  1827.               an item when it is covered by the scroll bar.  It can
  1828.               effect the background color for the key character.  This
  1829.               is useful for computers without high intensity or color
  1830.               capabilities.
  1831.               -------------------------------------------------------
  1832.               'EXAMPLE OF A CALL TO SCRLWIND - AUTO EXIT SCROLL WINDOW
  1833.  
  1834.               DIM LIST$(11)
  1835.               FOR X% = 1 TO 11              'ALWAYS START WITH 1
  1836.                  READ LIST$(X%)
  1837.               NEXT
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.                                   25                                  
  1846.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.               CALL MAKEWIND(15, "", 1, 1, 10, 13, 112, 2)
  1856.               KIND$ = "A" : RTRN% = 3: KEYATTR% = 116
  1857.               CALL SCRLWIND(LIST$(), 11, KIND$, RTRN%, KEYATTR%)
  1858.  
  1859.               DATA ONE
  1860.               DATA TW@O
  1861.               ' FOR ABOVE KEY CHAR. = "W"
  1862.               DATA TH@REE
  1863.               ' FOR ABOVE KEY CHAR. = "H"
  1864.               DATA FOUR
  1865.               DATA FIV@E
  1866.               ' FOR ABOVE KEY CHAR. = "V"
  1867.               DATA "-"
  1868.               ' FOR ABOVE PUT A LINE IN ROW 6
  1869.               DATA SIX@
  1870.               ' FOR ABOVE KEY CHAR. = "X"
  1871.               DATA SEVEN
  1872.               DATA EIGHT
  1873.               DATA NINE
  1874.               DATA TEN
  1875.               -------------------------------------------------------
  1876.  
  1877.               The scroll window is the window defined by the call to
  1878.               MAKEWIND as it is the active window when SCRLWIND is
  1879.               called.  The list in the scroll window is the items in
  1880.               the data statements, as they were read into LIST$().
  1881.               The second parameter in the call to SCRLWIND is the
  1882.               number of items in the list ( 11 ).  As KIND$ ="A"
  1883.               before calling SCRLWIND, the scroll window is an "AUTO-
  1884.               EXIT SCROLL" window. Since RTRN% = 3 when entering
  1885.               SCRLWIND the scroll bar will start over the third item (
  1886.               THREE ). The sixth DATA item    = "-". Therefore, a line
  1887.               will print in row six of the scroll window.  The key
  1888.               character for each item will be red ( KEYATTR% = 116 ).
  1889.               RTRN% will equal the selected item when SCRLWIND is
  1890.               exited.  As reading the data takes time, quicker scroll
  1891.               windows will be generated if all arrays used in scroll
  1892.               windows are filled using READ and DATA statement during
  1893.               program initialization.
  1894.  
  1895.               -------------------------------------------------------
  1896.               ' EXAMPLE - MULTIPLE SCROLL WINDOWS ( SINGLE MARK )
  1897.               ' FIRST INITIALIZE THE DATA FOR THE SCROLL WINDOWS. DO
  1898.               ' THIS AT THE BEGINNING OF THE PROGRAM FOR SPEED.
  1899.  
  1900.               DIM SWIND%(5), STR%(5), SLC%(5), SWID%(5), SNR%(5)
  1901.               DIM SENTRIES%(5), STITLE$(5)
  1902.               DIM SRTRN1$(4), SRTRN2$(5), SRTRN3$(4)
  1903.               DIM SRTRN4$(1), SRTRN5$(1)
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.                                   26                                  
  1912.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.               FOR X% = 1 TO 5       ' DATA FOR 5 SCROLL WINDOWS
  1922.  
  1923.               READ SWIND%(X%)       ' WINDOW # FOR EACH SCROLL WINDOW
  1924.               READ STR%(X%)         ' TOP ROW
  1925.               READ SLC%(X%)         ' LEFT COLUMN
  1926.               READ SWID%(X%)        ' WIDTH
  1927.               READ SNR%(X%)         ' NUMBER OF ROWS
  1928.               READ SENTRIES%(X%)    ' ENTRIES
  1929.               READ STITLE$(X%)      ' TITLE ( FOR WINDOWS TITLE BOX )
  1930.  
  1931.                  FOR Y% = 1 TO SENTRIES%(X%)
  1932.                     SELECT CASE X%         ' X% = WINDOW #
  1933.                        CASE 1
  1934.                          READ SRTRN1$(Y%)  ' LIST FOR SCROLL WINDOW 1.
  1935.                        CASE 2
  1936.                          READ SRTRN2$(Y%)  ' LIST FOR SCROLL WINDOW 2.
  1937.                        CASE 3
  1938.                          READ SRTRN3$(Y%)  ' LIST FOR SCROLL WINDOW 3.
  1939.                        CASE 4
  1940.                          READ SRTRN4$(Y%)  ' LIST FOR SCROLL WINDOW 4.
  1941.                        CASE 5
  1942.                          READ SRTRN5$(Y%)  ' LIST FOR SCROLL WINDOW 5.
  1943.                     END SELECT
  1944.                  NEXT
  1945.               NEXT
  1946.  
  1947.               ' DATA FOR EACH SCROLL WINDOW
  1948.               ' WINDOW#, TOP ROW,LEFT COLUMN,WIDTH,ROWS,ENTRIES,TITLE,
  1949.               ' ITEMS IN THE LIST
  1950.  
  1951.               DATA 16,5,16,12,8,4," TYPE",COLONIAL,SPLIT,BI-LEVEL,RANCH
  1952.               DATA 17,5,35,12,9,5," COLOR",WHITE,BLUE,TAN,BROWN,YELLOW
  1953.               DATA 18,5,54,12,8,4," LOCATION",NORTH,SOUTH,EAST,WEST
  1954.               DATA 19,14,24,14,3,1,"","----OK----"
  1955.               DATA 20,14,43,14,3,1,"","--CANCEL--"
  1956.  
  1957.               ' MARK THE FIRST ITEM IN EACH SCROLL WINDOW.  CAN BE
  1958.               ' USED FOR ANY ITEM IN THE WINDOW.
  1959.  
  1960.               SRTRN1% = 1: SRTRN2% = 1: SRTRN3% =1
  1961.  
  1962.               ' ******* LATER IN THE PROGRAM DO THIS:
  1963.  
  1964.               ' USE THE PREVIOUS DATA FOR THE MULTIPLE SCROLL
  1965.               ' WINDOWS.
  1966.  
  1967.               ' SAVE THE VALUES FOR THE MARKED ITEM IN EACH SCROLL
  1968.               ' WINDOW.  NEEDED FOR ESC OR --CANCEL-- .
  1969.  
  1970.               PRTRN1% = SRTRN1%: PRTRN2% = SRTRN2%: PRTRN3% = SRTRN3%
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.                                   27                                  
  1978.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.               ' MAKE FIVE WINDOWS. WINDOW NUMBERS 16 - 20 ( SWIND%() ).
  1988.               ' AS BORDER% MOD 100 = 0 THERE IS NO BORDER -- BE
  1989.               ' CAREFULL AS THE BLANK BORDER STILL OCCUPIES A POSITION
  1990.               ' ON THE SCREEN.
  1991.               ' AS THE BORDER (BRDR%) ARGUMENT =100 FOR WINDOWS 16, 17
  1992.               ' AND 18 THOSE WINDOWS HAVE A TITLE BOX.  THE "OK"  AND
  1993.               ' AND "CANCEL" SCROLL WINDOWS HAVE LESS THAN 5 ROWS SO
  1994.               ' THEY CAN'T HAVE NO TITLE BOX, THUS BRDR% IS SET TO 0.
  1995.               ' SINCE THE ARGUMENT FOR COLOR = 112 THE BACKGROUND
  1996.               ' COLOR WILL BE WHITE WITH A BLACK FOREGROUND.
  1997.               ' **** SUGGESTION: WHILE DEVELOPING MULTIPLE SCROLL
  1998.               ' WINDOWS SET THE BORDER TO PRINT.  THIS WILL GIVE A
  1999.               ' BETTER PICTURE AS TO HOW BIG THE WINDOWS ARE.  AFTER
  2000.               ' DEVELOPMENT THE BORDER CAN BE SET BLANK ( 100 OR 0 ).
  2001.  
  2002.               FOR X% = 1 TO 5
  2003.  
  2004.               ' BORDER IS TITLE BOX EXCEPT WINDOW 19 & 20
  2005.               IF SWIND%(X%) > 18 THEN BRDR%=0 ELSE BRDR%=100
  2006.  
  2007.               'PUT THE FOLLOWING CALL TO MAKEWIND ON ONE LINE.
  2008.                 CALL MAKEWIND (SWIND%(X%), STITLE$(X%), STR%(X%),
  2009.                               SLC%(X%), SWID%(X%), SNR%(X%), 112, BRDR%)
  2010.               NEXT
  2011.  
  2012.               KIND$ = "SV"  ' THIS MAKES THE SCROLL WINDOWS "SINGLE
  2013.                             ' MARK - VIEW" SCROLL WINDOWS FOR THE
  2014.                             ' FIRST PASS THROUGH THEM.  THE ITEMS IN
  2015.                             ' THE LIST FOR EACH SCROLL WINDOW WILL
  2016.                             ' PRINT IN THE WINDOW AND SCRLWIND WILL BE
  2017.                             ' EXITED.  AFTER ALL FIVE WINDOWS ARE
  2018.                             ' FILLED KIND$ IS SET TO "S" AND THE FIRST
  2019.                             ' SCROLL WINDOW BECOMES ACTIVE.  A USER
  2020.                             ' ACTION IS THEN REQUIRED.
  2021.  
  2022.           ' FILL THE SCROLL WINDOWS FIRST, THEN GO BACK TO THE
  2023.           ' FIRST ONE ( WINDOW # 16 ).  LAST ARGUMENT = 0 SO THE
  2024.           ' KEY CHARACTER IS THE SAME COLOR ( BLACK ON WHITE ) AS ALL
  2025.           ' OTHER CHARACTERS.  THE KEY CHARACTER IN THIS EXAMPLE IS
  2026.           ' ALWAYS THE FIRST CHARACTER.
  2027.  
  2028.           STARTS:
  2029.  
  2030.           ' SCROLL WINDOW TITLED "TYPE"
  2031.           CALL CHNGWIND (16)            ' MAKE 16 THE ACTIVE WINDOW
  2032.           CALL SCRLWIND (SRTRN1$(), SENTRIES%(1), KIND$, SRTRN1%, 0)
  2033.           IF SRTRN1% = 0  GOTO NOCHANGE       ' ESC
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.                                   28                                  
  2044.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.           ' SCROLL WINDOW TITLED "COLOR"
  2054.           CALL CHNGWIND (17)
  2055.           CALL SCRLWIND (SRTRN2$(), SENTRIES%(2), KIND$, SRTRN2%, 0)
  2056.           IF SRTRN2% = 0 GOTO NOCHANGE      ' ESC
  2057.  
  2058.           ' SCROLL WINDOW TITLED "LOCATION"
  2059.           CALL CHNGWIND (18)
  2060.           CALL SCRLWIND (SRTRN3$(), SENTRIES%(3), KIND$, SRTRN3%, 0)
  2061.           IF SRTRN3% = 0 GOTO NOCHANGE      ' ESC
  2062.  
  2063.           ' "OK" SCROLL WINDOW. SINGLE ENTRY SO NO ITEMS ARE MARKED.
  2064.           CALL CHNGWIND (19)
  2065.           CALL SCRLWIND (SRTRN4$(), SENTRIES%(4), KIND$, TEMP%, 0)
  2066.           IF TEMP% = 0 GOTO NOCHANGE        ' ESC
  2067.           IF KIND$ = "S" THEN               ' WAS NOT "SV" ( VIEW )
  2068.              IF TEMP% = 1 GOTO PROCEED      ' WAS ENTER OR RETURN
  2069.              IF TEMP% = 0 GOTO NOCHANGE     ' WAS ESC
  2070.           END IF
  2071.  
  2072.           ' "CANCEL" SCROLL WINDOW. SINGLE ENTRY SO NO ITEMS ARE MARKED.
  2073.           CALL CHNGWIND (20)
  2074.           CALL SCRLWIND (SRTRN5$(), SENTRIES%(5), KIND$, TEMP%, 0)
  2075.           IF KIND$ = "SV" THEN         ' DONE DISPLAYING WINDOWS SO
  2076.               KIND$ = "S"              ' MAKE "SINGLE MARK" SCROLL
  2077.               GOTO STARTS              ' WINDOWS AND START OVER.
  2078.           END IF
  2079.           IF TEMP% = - 1 GOTO STARTS   ' FOR SINGLE ENTRY SCROLL
  2080.                                        ' WINDOWS TEMP% = -1 FOR TAB.
  2081.  
  2082.           ' PROGRAM PROCEEDS HERE IF TAB WAS NOT PRESSED FOR
  2083.           ' "CANCEL" SCROLL WINDOW.  ENTER, RETURN OR ESC MUST HAVE
  2084.           ' BEEN PRESSED. PROGRAM GOES TO NOCHANGE TO RESTORE VALUES
  2085.  
  2086.           NOCHANGE:
  2087.           ' ESC OR CANCEL SELECTED. RESTORE PREVIOUSLY SAVED VALUES.
  2088.           SRTRN1% = PRTRN1%: SRTRN2% = PRTRN2%: SRTRN3% = PRTRN3%
  2089.  
  2090.           PROCEED:
  2091.           ' IF ENTER OR RETURN WAS PRESSED WITH THE "OK" SCROLL
  2092.           ' WINDOW ACTIVE SRTRN1%, SRTRN2%, AND SRTRN3% NOW HOLD THE
  2093.           ' MARKED ITEMS FOR THEIR RESPECTIVE SCROLL WINDOWS.  IF ESC
  2094.           ' OR "CANCEL" WAS SELECTED THE PROGRAM GOES TO NOCHANGE AND
  2095.           ' SRTRN1%, SRTRN2%, AND SRTRN3% ARE LOADED WITH THEIR OLD
  2096.           ' VALUES.
  2097.  
  2098.  
  2099.          3.01 MARKED%(RTRN$, START%)
  2100.  
  2101.               Description: MARKED%(RTRN$, START%) is a function used
  2102.               to decode RTRN$ after a call to SCRLWIND is made with
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.                                   29                                  
  2110.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.               the MARK option ON.   MARKED%(RTRN$, START%) will equal
  2119.               the next position in RTRN$ starting from position START%
  2120.               which contains a CHR$(26).  If the third element (item)
  2121.               in LIST$() was marked in the call to SCRLWIND and START%
  2122.               =1, THEN: MARKED%(RTRN$,START%) = 3.
  2123.  
  2124.               Arguments:   RTRN$ is the string returned by calling
  2125.               SCRLWIND with the MARKED option ON. RTRN$ = "" if no
  2126.               items were marked.
  2127.  
  2128.  
  2129.                           START% is the postion in RTRN$ to start
  2130.               searching for a CHR$(26).  A CHR$(26) in  RTRN$
  2131.               represents a marked element in the string array LIST$()
  2132.               used in SCRLWIND. Every time a position in RTRN$ is
  2133.               found which corresponds to a marked element of LIST$(),
  2134.               START% is set to a new value which is equal to the
  2135.               "marked" position in RTRN$ + 1.  This is the next
  2136.               position in RTRN$ where the search will start for
  2137.               another "marked" position. If MARKED% =0 there are no
  2138.               more "marked" positions in RTRN$ or RTRN$ = "".
  2139.               -------------------------------------------------------
  2140.               'EXAMPLE USING THE FUNCTION MARKED% (RTRN$,START%) THIS
  2141.               'EXAMPLE PRINTS THE MARKED ITEMS IN LIST$() AFTER A CALL
  2142.               'TO SCRWIND.
  2143.  
  2144.               'GIVEN: SCRLWIND HAS BEEN CALLED. THE FOURTH AND TENTH
  2145.               'ELEMENTS OF LIST$() WERE MARKED.  RTRN$ WAS RETURNED BY
  2146.               'A PREVIOUS THE CALL TO SCRLWIND.
  2147.  
  2148.               DECLARE FUNCTION MARKED%(RTRN$,START%)   ' MUST BE IN
  2149.               '(Put this at the start of the module)   ' MODULE USING
  2150.                                                        ' FUNC. MARKED%.
  2151.  
  2152.               START%=1                ' START THE SEARCH AT POSITION 1
  2153.                                       ' OF RTRN$.
  2154.  
  2155.               DO                                   ' MARKED% = 0 AFTER
  2156.                  A% = MARKED%(RTRN$, START%)       ' ALL MARKED ITEMS
  2157.                  IF A% = 0 THEN EXIT DO            ' ARE FOUND OR IF
  2158.                    PRINT LIST$(A%)
  2159.                  END IF
  2160.               LOOP
  2161.               -------------------------------------------------------
  2162.               The first time through the loop, MARKED% (RTRN$, START%)
  2163.               will equal 4, and LIST$(4) will print.  START% is auto-
  2164.               matically set to 5, the next position to start searching
  2165.               RTRN$ for a "marked" position in RTRN$.  The second loop
  2166.               will set MARKED% (RTRN$,START%) to 10 and LIST$(10) will
  2167.               print.  As there are no more marked positions, MARKED% =
  2168.               0 and the loop be exited.
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.                                   30                                  
  2176.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.                          ***** GET ANSWER WINDOWS *****
  2186.  
  2187.          This routine pauses the program, prompts the user, and waits
  2188.          for the user to press a key.  The prompt may, optionally, be
  2189.          windowed.  The key may be any key, or an individual key from a
  2190.          list of permissible keys.  The area covered by prompt and
  2191.          window, if one exists, is restored after the key is pressed.
  2192.  
  2193.          4.00 GETANS (PROMPT$, CHOICE$, ANS$, TR%, LC%, ATTR%, BORDER%)
  2194.  
  2195.               Description: Generates a prompt with an optional window
  2196.               and pauses, waiting for a single key reply.
  2197.  
  2198.               Arguments:   PROMPT$ is the prompt (i.e. Press any key )
  2199.               or question (i.e. Are you sure?  Y/N ).  It may be
  2200.               optionally windowed ( SEE BORDER% ).  The width of the
  2201.               window is determined by the length of PROMPT$.  If
  2202.               PROMPT$ is too long making the window, or prompt, too
  2203.               wide to fit on the screen an error will be reported.
  2204.  
  2205.                            CHOICE$ is the valid keys the user can
  2206.               press to exit GETANS.  If CHOICE$ = "" any key will
  2207.               exit.  This would be appropriate if PROMPT$ = "Press any
  2208.               key".  If CHOICE$ = "YN" then the "Y", "y", "N" or
  2209.               "n" keys will exit GETANS.  The ESC key will always exit
  2210.               regardless of CHOICE$.
  2211.  
  2212.                            ANS$ is the key pressed.  It is returned in
  2213.               upper case.  If CHOICE$ = "" then ANS$ = "".  If ESC is
  2214.               pressed CHR$(27) is always returned in ANS$.
  2215.  
  2216.                            TR% is the top row.  See MAKEWIND
  2217.  
  2218.                            LC% is the left column.  See MAKEWIND
  2219.  
  2220.                            ATTR% is the color designation.  See
  2221.               MAKEWIND.  Although it is permissible to set ATTR% > 127
  2222.               to make the border flash the text will not flash.
  2223.  
  2224.                            BORDER% is the window's border designation.
  2225.               Title boxes ( BORDER% > 42 ) are not permitted.  Set
  2226.               BORDER% to 0 for no window ( prompt only ). SEE THE
  2227.               BORDER DESIGNATION CHART.
  2228.  
  2229.               EXAMPLE OF A CALL TO GETANS:
  2230.  
  2231.               CALL GETANS ("Are you sure? Y/N", "YN", ANS$, 100, 100,
  2232.               240, 11)
  2233.               ( Above must be on one line. )
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.                                   31                                  
  2242.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.               A window will be generated with the text "Are you sure?
  2252.               Y/N"  printed in it.  With TR% and LC% set to 100 the
  2253.               window will be centered on the screen ( See MAKEWIND ).
  2254.               ATTR% = 240, therefore, the window will be white with
  2255.               black text and a black flashing border. The user may
  2256.               press the N, n, Y, y, or ESC keys to exit.  The key
  2257.               pressed will be returned to GETANS in the argument ANS$.
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.                                   32                                  
  2308.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.                          ***** INPUT ROUTINES *****
  2318.  
  2319.          Input routines provide users with the ability to generate a
  2320.          single input field ( INPTWIND ), or multiple input fields
  2321.          ( MULTINPT ).  Full editing is provided within each field.
  2322.          Up to 10 multiple input screens may be used, with each screen
  2323.          capable of supporting up to 100 fields. Fields may be defined
  2324.          as numeric, alpha/numeric, or date. Numeric fields may be
  2325.          designated 0 to 6 decimal places and optionally padded with
  2326.          leading zero's.  Numerous additional options are available.
  2327.  
  2328.          5.00 INPTWIND (P$,CODE$,TR%,LC%,WD%,ATTR%,RES$,RTRN$,RKEY%,BRDR%)
  2329.  
  2330.               Description:  Makes an input field, which may optionally
  2331.               be windowed. The area under the field or window is auto-
  2332.               matically saved. It is restored upon exiting the routine.
  2333.  
  2334.               Arguments:   P$ is the message ( prompt ) which will be
  2335.               printed to the left of the input field or in the title
  2336.               box of the window, if one is specified.  If P$ is
  2337.               preceded by a "@" it will be centered in the title box.
  2338.  
  2339.                            CODE$ sets the type of input field and may
  2340.               may equal the following.
  2341.  
  2342.                       "A"  - Alpha/numeric.  All standard keys are
  2343.                              active.
  2344.  
  2345.                       "U"  - Alpha/numeric.  Upper case.
  2346.  
  2347.                       "L"  - Alpha/numeric.  Lower case.
  2348.  
  2349.                       "D"  - Date.  If a field is a date field it can
  2350.                              not be exited unless the date is valid or
  2351.                              the field is blank.  The number keys are
  2352.                              active.  Depending on the date format
  2353.                              specified in the call to SETWIND, the
  2354.                              ".", "/" or "-" key will be active also.
  2355.                              Valid dates range from 01/01/1901 to
  2356.                              12/31/2099 if the width of the date field
  2357.                              is 10, or 01/01/01 to 12/31/99 if the
  2358.                              width of the date field is 8.   SEE DES-
  2359.                              SCRIPTION FOR DFORMAT% IN ROUTINE
  2360.                              "SETWIND".
  2361.  
  2362.               "P0" or "0"  - Numeric. The value of the string desig-
  2363.               "P1" or "1"    nates the number of decimal places that
  2364.               "P2" or "2"    will be returned, even if more are
  2365.               "P3" or "3"    entered.   The field can not be exited
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.                                   33                                  
  2374.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.               "P4" or "4"    unless the number, with the correct
  2383.               "P5" or "5"    number of decimal places will fit in the
  2384.               "P6" or "6"    the field. or the field is blank.  The
  2385.                              numeric,"-", and "." keys are active.
  2386.                              The minus sign will only print in the
  2387.                              first position of the field.  If a
  2388.                              decimal point is in the field another one
  2389.                              can not be entered until the previous one
  2390.                              is deleted.
  2391.  
  2392.               NOTE: A numeric field will be padded with leading
  2393.               zeros if CODE$ contains a "P."
  2394.  
  2395.               EXAMPLE:     CODE$ = "3P" --- This allows numeric
  2396.                            input.  It will return the data expanded,
  2397.                            or truncated to, 3 digits after the dec-
  2398.                            imal point and padded with leading zeros.
  2399.  
  2400.                            TR% is the top row of the field, or window.
  2401.               If a window is designated, TR% must equal 1 to 23.
  2402.               Without a window  TR% must equal 1 to 25.  Setting TR%
  2403.               to 100 centers the field, or window, top to bottom.
  2404.  
  2405.                            LC% is the left column.  If a window is
  2406.               designated, LC% must equal 1 to 76 ( 36 in 40 column
  2407.               mode ). With no window LC% must equal 1 to 79 ( 39 in
  2408.               40 column mode ). If LC% = 100  the field, or window, is
  2409.               centered left to right.  If LC% is set so the input
  2410.               field with a window, if specified, or with a prompt, if
  2411.               specified, will not fit on the screen an error will be
  2412.               reported.
  2413.  
  2414.                            WD% is the fields width.  A date field must
  2415.               have WD%=10 or WD%=8.  A numeric field requires WD% to
  2416.               be from the number of ( decimal places + 1 ) to 15, and
  2417.               for an alpha/numeric field WD% can range from 1 to the
  2418.               screen width minus 1 ( minus 4 if windowed ).
  2419.  
  2420.                            ATTR% is the window's and PROMPT$'s color.
  2421.               The color of the input field is the inverse of the
  2422.               window's color.  The field's foreground color is the
  2423.               same as the window's background color while the field's
  2424.               background has the same color as the windows foreground.
  2425.               SEE THE COLOR ATTRIBUTE CAHRT.  To make the field's
  2426.               foreground color high intensity, add 1000 to ATTR%.
  2427.  
  2428.               EXAMPLE:  ATTR% = 1160.  ( 1000 + 160 ) The "160"
  2429.               produces a flashing black on green window.  ( SEE THE
  2430.               COLOR ATTRIBUTE CHART. ).  The "1000" makes the field
  2431.               text high intensity green.
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.                                   34                                  
  2440.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.                            RES$ is the restrict string. It holds the
  2450.               allowable characters which can be entered in the input
  2451.               field.  RES$ IS IGNORED IF CODE$ IS NOT ALPHA/NUMERIC
  2452.               ("A").  IF CODE$ IS ALPHA/NUMERIC ("A") AND RES$ = ""
  2453.               ALL STANDARD ALPHA/NUMERIC KEYS ARE ALLOWABLE. (SEE
  2454.               SETINPT IN SECTION 5.01 FOR DETAILS.)
  2455.  
  2456.                            RTRN$ is the string passed to, and returned
  2457.               from the input field.  A numeric string can be converted
  2458.               to a number by using the VAL function.
  2459.  
  2460.               EXAMPLE:  IF RTRN$= "123.123" IT CAN BE CONVERTED TO A
  2461.               NUMBER (A) WITH THE STATEMENT:
  2462.  
  2463.                            A = VAL(RTRN$)
  2464.                            A now equals 123.123
  2465.  
  2466.                                RKEY% is returned by INPTWIND.  RKEY% = 1
  2467.              if INPTWIND was exited by the RETURN key being pressed. RKEY%
  2468.              = 0 if the ESC key caused INPTWIND to be exited.
  2469.  
  2470.                            BRDR% is the input windows border. ( SEE
  2471.              THE BORDER DESIGNATION CHART ). If BRDR% = 0 a single
  2472.              line input field ( no window ) is generated.  If BRDR%
  2473.              produces a title box window, PROMPT$ will printed in the
  2474.              title box.
  2475.  
  2476.  
  2477.          5.01 SETINPT ( SCRN%, COLWID%, EXIT$, INPT%(), INPT$(), ACTCOL% )
  2478.  
  2479.               Description: Defines a multi-field input screen, which
  2480.               will be called by MULTINPT.
  2481.  
  2482.               Arguments:   SCRN% is the number or the screen being
  2483.               defined.  SCRN% may range from 1 to 10.
  2484.  
  2485.                            COLWID% is the column width of the screen
  2486.               and must equal 40 or 80.
  2487.  
  2488.                            EXIT$ is the code for keys which will
  2489.               exit the multi-field input routine for the designated
  2490.               screen number.  To make the function keys active place
  2491.               their number "1","2" etc in EXIT$.   A "0" represents
  2492.               the F10 key, a "D" the PGDN key , a "U" the PGUP key and
  2493.               an "E" the ESC key.
  2494.  
  2495.               EXAMPLE: IF EXIT$ ="03U" THE F10, F3, OR PGUP KEYS WILL
  2496.               EXIT THE MULTI-FIELD INPUT ROUTINE ( MULTINPT ).
  2497.  
  2498.               NOTE:  If the ESC key is not used as an exit key it is
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.                                   35                                  
  2506.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.               used to return the text in a field in MULTINPT to it's
  2515.               pre-edited state.  This feature is disabled when ESC is
  2516.               used as an exit key.   The SPACE BAR can also be an exit
  2517.               key for individual fields in MULTINPT if a field is a
  2518.               FIXED CHOICE field.   See the description for argument
  2519.               INPT%(), element CODE%, in this routine to use FIXED
  2520.               CHOICE fields.
  2521.  
  2522.                            INPT%() and INPT$() hold the data
  2523.               representing the parameters for each field in the multi-
  2524.               field input screen.  Starting at INPT%(1) and INPT$(1),
  2525.               the elements of INPT%() AND INPT$() are as follows;
  2526.  
  2527.                            ------------ INPT%() ---------- -INPT$()-
  2528.                             1      2    3    4     5    6    1
  2529.               (Field #1)   CODE%, TR%, LC%, WD%, ATTR%, 99, RES$
  2530.               (Field #2)   ...... Repeat above for each field
  2531.                            9999 ( signals end of INPT%()/INPT$() )
  2532.  
  2533.               INPT%(1)=CODE% FOR FIELD 1, INPT%(7)=CODE% FOR FIELD 2
  2534.               INPT$(1)=RES$ FOR FIELD 1, INPT$(2)=RES$ FOR FIELD 2
  2535.  
  2536.                            CODE% is the code for type of input field
  2537.               and can be as follows;
  2538.  
  2539.               0 to 6 ----- The field is numeric with the indicated
  2540.               number of decimal places.
  2541.  
  2542.               10 to 16 --- The field is numeric with padded zeros.
  2543.               Subtract 10 to obtain the number of decimal places.
  2544.  
  2545.               7 ---------- The field is alpha/numeric.
  2546.               8 ---------- The field is a date field.
  2547.               17 --------- The field is alpha/numeric. (upper case)
  2548.               27 --------- The field is alpha/numeric. (lower case)
  2549.  
  2550.               SEE ROUTINE "INPTWIND", ARGUMENT CODE$, FOR A DESCRIP-
  2551.               TION AND INPUT LIMITATIONS FOR FIELDS BASED ON THEIR
  2552.               DESIGNATION.
  2553.  
  2554.               Adding 100 to CODE% makes the field protected.  A
  2555.               protected field will be displayed but can not be
  2556.               edited.   A protected field can not be an Auto-advance
  2557.               or Auto-exit field.  If a protected field is defined as
  2558.               an Auto-exit or Auto-advance field the definition is
  2559.               ignored and the field remains a protected field.
  2560.  
  2561.               Adding 1000 to CODE% makes the field an Auto-advance
  2562.               field.  When the cursor reaches the end of an Auto-
  2563.               advance field, via typing a character, it moves to the
  2564.               next field.  ( User defined order. )
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.                                   36                                  
  2572.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.               Adding 10000 to CODE% makes the field an "Auto-exit
  2581.               always" field.   The multi-field input routine will be
  2582.               exited whenever the cursor is moved from an "Auto-exit
  2583.               always" field.
  2584.  
  2585.               Adding 20000 to CODE% makes the field an "Auto-exit on
  2586.               change" field.  The multi-field input routine will be
  2587.               exited only when the data in the field is changed and
  2588.               the cursor is moved from the field.  This is useful if a
  2589.               field is part of a formula to calculate another fields
  2590.               value.
  2591.  
  2592.               Adding 30000 to CODE% makes the field a "Fixed choice"
  2593.               field.  The multi-field input routine will be exited if
  2594.               the space bar is pressed or if the cursor is moved from
  2595.               a "fixed choice" field.   This also makes the field an
  2596.               auto-exit (always) field.  The description for the
  2597.               procedure MULTINPT describes the details of a "fixed
  2598.               choice" field.
  2599.  
  2600.               EXAMPLE: If CODE%= 21017 THEN CODE% = 20000+1000+17.
  2601.               THE FIELD IS ALPHA/NUMERIC ( UPPER CASE ), AUTO-ADVANCE
  2602.               AND "AUTO-EXIT ON CHANGE".
  2603.  
  2604.                ** SEE THE MULTI-FIELD CODE CHART IN THE APPENDIX.**
  2605.  
  2606.                            TR%, LC%, and WD% are the same as in
  2607.               INPTWIND.
  2608.  
  2609.                            ATTR% is the fields color.
  2610.  
  2611.                            99 is a check and must follow the numeric
  2612.               data which defines each field.
  2613.  
  2614.                            RES$ defines the allowable characters
  2615.               in a restricted field.  If the field is not set to
  2616.               alpha/numeric by CODE%, RES$ is ignored.  Setting RES$ to
  2617.               "YN" and CODE% TO 17 ( UPPER CASE ) allows the field to
  2618.               respond to Y,y,N or n.  If CODE% = 7 ( UPPER AND LOWER
  2619.               CASE ) and RES$ ="YN" the field is restricted to Y or N.
  2620.               IF CODE%=27 ( LOWER CASE ) and RES$ ="YN" the field will
  2621.               not allow any characters.  If RES$ = "" the field is not
  2622.               restricted and will respond to characters predicated on
  2623.               the value of CODE%.
  2624.  
  2625.               NOTE: IT IS ONLY NECESSARY TO USE RES$ FOR NON-STANDARD
  2626.               FIELDS.  SET RES$ TO "" FOR NORMAL ALPHA/NUMERIC FIELDS
  2627.               OR THE RESULT WILL BE EXTRA CODE AND MEMORY USAGE.  IF
  2628.               THE FIELD IS STANDARD ALPHA/NUMERIC MAKE CODE% = 7 AND
  2629.               RES$ = "".  THIS WILL ALLOW UPPER/LOWER CASE ALPHA/NUM-
  2630.               ERIC INPUT.
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.                                   37                                  
  2638.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.                      EXAMPLE: RES$ = "0123456789-( )"
  2648.  
  2649.                      THIS RESTRICTS INPUT TO CHARACTERS INCLUDED IN
  2650.                      A PHONE NUMBER WITH THE AREA CODE.
  2651.  
  2652.                            ACTCOL% is the color attribute of the active
  2653.               input field.  Use ACTCOL% to make the active field a
  2654.               different color than the inactive fields.  If ACTCOL% = 0,
  2655.               ACTCOL% is ignored and the active field's color will not
  2656.               change.   ACTCOL% is adjusted to ACTCOL% MOD 128.
  2657.  
  2658.               -------------------------------------------------------
  2659.               'EXAMPLE OF A CALL TO SETINPT
  2660.  
  2661.               A% = 20: B% = 3            ' SET UP TEMPORARY ARRAYS FOR DATA.
  2662.               DIM INPT% (A%), INPT$(B%)  ' USE THIS METHOD SO ARRAY WILL BE
  2663.                                          ' DYNAMIC AND CAN BE DE-ALLOCATED
  2664.                                          ' LATER. DON'T USE DIM INPT%(20)
  2665.  
  2666.               FLD% = 1
  2667.               B% = 1                     ' ALWAYS START THE ARRAYS AT 1
  2668.               DO                         ' OR THE FIRST FIELD WILL BE
  2669.                 READ INPT%(B%)           ' LOST.
  2670.                 IF INPT%(B%)=9999 THEN EXIT DO   ' 9999 MARKS THE END
  2671.                 B% = B% + 1
  2672.  
  2673.                 FOR X% = 1 TO 5
  2674.                   READ INPT%(B%)         ' READ REMAINING NUMERIC DATA
  2675.                   B% =B% + 1             ' IN INPT%().  TR%,LC%,WD%
  2676.                 NEXT                     ' ATTR% AND THE CHECK (99).
  2677.                 READ INPT$(FLD%)         ' THEN READ INPT$() DATA FOR
  2678.                 FLD% = FLD% + 1          ' RESTRICTED FIELDS.
  2679.               LOOP
  2680.  
  2681.               DATA 0,1,1,15,112,99,""
  2682.               ' NUMERIC - TR%=1, LC%=1, WD%=15, ATTR%=7, CHECK MUST=99
  2683.               ' NOT RESTRICTED. THIS IS FIELD #1 (1st DATA STATEMENT)
  2684.  
  2685.               DATA 17,3,1,1,112,99,"YN"
  2686.               ' ALPHA/NUM ( UPPER CASE ) TR%=3, LC%=1, WD%=1, ATTR%=7
  2687.               ' CHECK MUST=99, RESTRICTED TO Y,N,y,or n.
  2688.               ' THIS FIELD #2 (2nd DATA STATEMENT)
  2689.  
  2690.               DATA 108,5,1,10,32,99,""
  2691.               ' PROTECTED DATE - TR%=5, LC%=1 WD%=10, ATTR%=32
  2692.               ' CHECK MUST = 99', NOT RESTRICTED
  2693.               ' THIS IS FIELD #3 (3rd DATA STATEMENT)
  2694.  
  2695.               DATA 9999
  2696.               ' 9999 MARKS THE END
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.                                   38                                  
  2704.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.               CALL SETINPT( 1, 80, "12", INPT%(), INPT$(), 15 )
  2714.  
  2715.               ERASE INPT%, INPT$       ' GET THE MEMORY BACK
  2716.  
  2717.               '------------------------------------------------------
  2718.               ' THE MULTI-FIELD INPUT SCREEN (#1) IS 80 COLUMNS WIDE
  2719.               ' AND WILL BE EXITED IF THE F1 OR F2 KEYS ARE PRESSED.
  2720.               ' THERE ARE 3 FIELDS AS PER THE DATA STATEMENTS. A CALL
  2721.               ' TO MULTINPT WILL DISPLAY THE FIELDS AND WAIT FOR
  2722.               ' INPUT. INPUT ENDS WHEN THE F1 OR F2 KEYS ARE PRESSED.
  2723.               ' THE ACTIVE FIELD WILL BE HIGH INTENSTIY WHITE ON BLACK.
  2724.               '-------------------------------------------------------
  2725.  
  2726.  
  2727.          5.02 MULTINPT ( SCRN%, FLD%, EXIT$, AUTOEXIT%, RKEY%, RTRN$() )
  2728.  
  2729.               Description: Displays input fields defined in a previous
  2730.               call to SETINPT.  Fields are available for full editing
  2731.               Returns edited strings to the calling program.
  2732.  
  2733.               Arguments:   SCRN% is the number ( 1 to 10 ) of the
  2734.               multi-field input screen to display.
  2735.  
  2736.                            FLD% serves two purposes.  When entering
  2737.               MULTINPT, FLD% determines which field will be the
  2738.               active field ( the one with the cursor ).  It may range
  2739.               from one to the last field as designated by SETINPT.
  2740.  
  2741.               When exiting MULTINPT, FLD% points to the next field the
  2742.               cursor would normally occupy.  If a field is auto-exit
  2743.               ( always ) and the down arrow is pressed, MULTINPT will
  2744.               be exited.  FLD% will point to the field the cursor
  2745.               would normally occupy via the down arrow being pressed.
  2746.               This enables MULTINPT to be exited by an auto-exit
  2747.               field and re-entered at the correct field.  If the field
  2748.               is a fixed choice field and the space bar is pressed,
  2749.               FLD% will point to the fixed choice field ( the one the
  2750.               cursor was in before MULTINPT was exited ).
  2751.  
  2752.                            EXIT$ is also multi-purposed.  When
  2753.               entering MULTINPT, setting EXIT$ to "VIEW" causes
  2754.               MULTINPT fill a field or all fields with their
  2755.               corresponding data.  MULTINPT is then exited.  This is
  2756.               useful for viewing a multi-field screen or updating a
  2757.               single field ( see AUTOEXIT% ).
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.                                   39                                  
  2770.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.               MULTINPT will be exited and EXIT$ will equal "F1" to
  2780.               "F10", "PGUP", "PGDN", "ESC", or "FIXED" when a valid
  2781.               exit key was pressed.  Valid exit keys are determined
  2782.               via the call to SETINPT for the multi-field input
  2783.               screen.  Valid exit keys may also include the SPACE BAR.
  2784.               EXIT$ will equal "FIXED" if MULTINPT is exited when the
  2785.               SPACE BAR is pressed and the cursor is in a fixed choice
  2786.               field.  It is important to note that fixed choice fields
  2787.               are also auto-exit ( always ) fields.  If a fixed choice
  2788.               field is exited via the cursor moving from it to another
  2789.               field EXIT$ will equal "AUTO".
  2790.  
  2791.               MULTINPT will be exited and EXIT$ will equal "AUTO"
  2792.               under the following conditions.
  2793.  
  2794.               1. The cursor was moved from an auto-exit ( always )
  2795.                  field to another field.  This is also the case if the
  2796.                  cursor is moved from a fixed choice field.
  2797.  
  2798.               2. The cursor was moved from an auto-exit ( on change )
  2799.                  field to another field and the text in the auto-exit
  2800.                  ( on change ) field was altered.  This includes fixed
  2801.                  choice fields.
  2802.  
  2803.                            AUTOEXIT% also serves two purposes.  If
  2804.               AUTOEXIT% is set to zero, MULTINPT, when entered, will
  2805.               update all fields.  If AUTOEXIT% is set from one to the
  2806.               last field number only the specified field is updated.
  2807.               This allows quick exiting from, and re-entering of
  2808.               MULTINPT.
  2809.  
  2810.               When MULTINPT is exited AUTOEXIT% is set to zero or to
  2811.               an auto-exit field number.  The value of AUTOEXIT%
  2812.               remains the same if MULTINPT is exited by an exit key
  2813.               (F1,F2..) or by an auto-exit or fixed choice field.  The
  2814.               following conditions will set AUTOEXIT% to a field
  2815.               number on exit ( not zero ).
  2816.  
  2817.               1. The cursor was in an auto-exit field ( always )
  2818.                  field and MULTINPT was exited by an exit key or the
  2819.                  auto-exit feature ( cursor moving from the field ).
  2820.  
  2821.               2. The cursor was in an autoexit ( on change ) field,
  2822.                  the field's data was changed, and MUTINPT was exited
  2823.                  by an exit key or the auto-exit feature.
  2824.  
  2825.               3. The cursor was in a fixed choice field and MULTINPT
  2826.                  was exited by an exit key, by the space bar being
  2827.                  pressed, or by moving the cursor from the fixed
  2828.                  choice field.  As previously stated fixed choice
  2829.                  fields are also autoexit ( always ) fields.
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.                                   40                                  
  2836.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.               NOTE: If the cursor is in an auto-exit or fixed choice
  2846.               field and MULTINPT is exited via an exit key (F1,F2..)
  2847.               EXIT$ will not equal "AUTO".  It will equal the key
  2848.               pressed ( F1,F2 .. etc. ).  Check AUTOEXIT% to verify
  2849.               if the cursor was in an auto-exit field when MULTINPT
  2850.               was exited.
  2851.  
  2852.               If AUTOEXIT% equals a valid field number ( not zero) and
  2853.               EXIT$ = "VIEW" when entering MULTINPT, the field
  2854.               specified by the value of AUTOEXIT% will be updated and
  2855.               MULTINPT will be exited.  This method can be used to
  2856.               update any single field and exit.
  2857.  
  2858.                            RKEY% returns a value designation for the
  2859.               key or feature which caused MULTINPT to be auto-exited.
  2860.               MULTINPT is auto-exited whenever the cursor is moved out
  2861.               of an auto-exit ( always ) field, fixed choice, or auto-
  2862.               exit ( on change ) field and the field's text was
  2863.               changed.  MULTINPT is also auto-exited when the SPACE
  2864.               BAR is pressed with the cursor in a fixed choice field.
  2865.  
  2866.               RKEY% may equal:
  2867.  
  2868.               0 --- An exit key ( F1,F2 etc. ) caused MULTINPT to be
  2869.                     exited.  MULTINPT was not exited by the auto-exit
  2870.                     feature.
  2871.               13 -- The RETURN key caused MULTINPT to be auto-exited.
  2872.               14 -- SHIFT TAB or the LEFT ARROW caused MULTINPT to be
  2873.                     auto-exited.
  2874.               15 -- The TAB key or RIGHT ARROW caused MULTINPT to be
  2875.                     auto-exited.
  2876.               16 -- The UP ARROW caused MULTINPT to be auto-exited.
  2877.               17 -- The CONTROL-HOME combination caused MULTINPT to be
  2878.                     auto-exited.
  2879.               18 -- The CONTROL-END combination caused MULTINPT to be
  2880.                     auto-exited.
  2881.               19 -- The DOWN ARROW cause MULTINPT to be auto-exited.
  2882.               20 -- The AUTO-ADVANCE feature caused MULTINPT to be
  2883.                     auto-exited.  The field must also be an auto-exit
  2884.                     field.  This occurs when the text fills an auto-
  2885.                     advance, auto-exit, field.
  2886.               32 -- The SPACE BAR cause MULTINPT to be auto-exited.
  2887.                     This is appropriate for fixed choice fields.
  2888.  
  2889.  
  2890.                            RTRN$() is a string array which holds the
  2891.               data to be edited.  Elements of RTRN$() will be
  2892.               displayed in the appropriate fields.  RTRN$(1) will be
  2893.               displayed in field 1 and so on.  Make sure there is not
  2894.               a RTRN$(0) as it will not be displayed.  If a field is
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.                                   41                                  
  2902.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.               numeric, the number to be placed in it must be converted
  2911.               to a string.  Convert the number (A) to a string as
  2912.               follows:   RTRN$(2) = STR$(A)
  2913.  
  2914.               When MULTINPT is exited RTRN$() holds the data in it's
  2915.               edited state.
  2916.  
  2917.               Upon entering MULTINPT, if the field is designated as
  2918.               alpha/numeric and the string will not fit in the field
  2919.               it will be truncated to fit.  If the field is numeric
  2920.               and a number formatted to the correct number of decimal
  2921.               places will not fit in the field, "*"'s will be printed.
  2922.               This will not pose a problem if RTRN$() is initialized
  2923.               via MULTINPT, as MULTINPT will not allow the user to
  2924.               input data longer than the field's width.  If a numeric
  2925.               field is entered with an alpha string the string will
  2926.               print in the field. It is the programmer's responsibility
  2927.               to assure numeric fields contain numeric strings.  IF
  2928.               A FIELD IS NUMERIC WITH 4 DECIMAL PLACES SETTING THE
  2929.               FIELD TO EQUAL "DOG", WILL RESULT IN DOG.0000 BEING
  2930.               DISPLAYED!
  2931.  
  2932.               Use caution if a field is a result of calculation, as
  2933.               the result may be in exponential format.  EXAMPLE:
  2934.  
  2935.                      A = 1       B = 14      C = A/B
  2936.  
  2937.               STR$(C) = "7.142857E-02".  If the field is numeric with
  2938.               four decimal places and set to equal STR$(C) it will
  2939.               print as 7.1428, and not as .0714.
  2940.  
  2941.               To following routine corrects numbers in expoential form
  2942.               for both large and small numbers.  A$ is the numeric
  2943.               string to be displayed in a field.
  2944.  
  2945.               IF INSTR(3, A$, "+") THEN A$ = "9999999999999999"
  2946.               REM: THE NUMBER WAS TOO LARGE. ( EX: 2.2D+22 )
  2947.               REM: SET TO "9999999999999999" AND "*"'s WILL
  2948.               REM :BE DISPLAYED.
  2949.  
  2950.               IF INSTR(3, A$, "-") THEN
  2951.                  A# = VAL(A$): A# = A# + SGN(A#): A$ = STR$(A#)
  2952.                  IF ABS(A#) > 1 THEN
  2953.                     A$ = MID$(A$, INSTR(A$, "."))
  2954.                     IF A# < 1 THEN A$ = "-" + A$
  2955.                  ELSE
  2956.                     A$="0"
  2957.                  END IF
  2958.               END IF
  2959.               REM: THE NUMBER WAS TOO SMALL. IF A$ = "3.33D-4",
  2960.               REM: A$ WILL NOW = ".000333"
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.                                   42                                  
  2968.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.        ---------------------------------------------------------------
  2978.              FIELD EDITING FEATURES FOR "MULTINPT" AND "INPTWIND"
  2979.                   ( * = AVAILABLE FOR "MULTINPT" ONLY. )
  2980.        ---------------------------------------------------------------
  2981.        KEY                FUNCTION
  2982.  
  2983.        SPACE BAR       ERASES FIELD - IF IT IS THE FIRST KEY PRESSED.
  2984.  
  2985.        *UP ARROW       MOVES THE CURSOR FROM FIELD TO FIELD AS DETER-
  2986.        *DOWN ARROW     MINED BY THE ORDER DEFINED IN "SETINPT."  THE
  2987.                        DOWN ARROW MOVES THE CURSOR IN ASCENDING FIELD
  2988.                        ORDER. THE UP ARROW MOVES IT IN DESCENDING
  2989.                        FIELD ORDER.  PROTECTED FIELDS ARE SKIPPED.
  2990.  
  2991.        *CTRL END       MOVES THE CURSOR TO THE FIRST OR LAST FIELD AS
  2992.        *CTRL HOME      DESIGNATED BY THE ORDER DEFINED IN "SETINPT".
  2993.  
  2994.        *TAB            MOVES THE CURSOR FROM FIELD TO FIELD HORIZONT-
  2995.        *SHIFT TAB      ALLY. TAB MOVES LEFT TO RIGHT, SHIFT TAB MOVES
  2996.                        RIGHT TO LEFT. PROTECTED FIELDS ARE SKIPPED.
  2997.  
  2998.        CTRL E          ERASES THE FIELD.
  2999.  
  3000.        ESC             RETURNS A FIELD TO IT'S PRE-EDITED STATE OR
  3001.                        EXITS "MULTINPT".  EXITS "INPTWIND" WITH PRE-
  3002.                        EDITED STRING.  ESC EXITS "MULTINPT" IF THE
  3003.                        ESC KEY WAS DESIGNATED AS AND EXIT KEY BY
  3004.                        "SETINPT" ( FIELD NOT RESTORED TO PRE-EDITED
  3005.                        STATE ).
  3006.  
  3007.        ENTER           EXITS "INPTWIND".  SAME AS DOWN ARROW FOR
  3008.        RETURN          "MULTINPT".
  3009.  
  3010.        END             MOVES THE CURSOR TO THE FIRST OR LAST POSITION
  3011.        HOME            OF TEXT WITHIN A FIELD.
  3012.  
  3013.        BACKSPACE       DELETES THE CHARACTER TO THE LEFT OF CURSOR.
  3014.  
  3015.        DELETE          DELETES THE CHARACTER UNDER THE CURSOR AND
  3016.                        SHIFTS CHARACTERS LEFT.
  3017.  
  3018.        INSERT          TOGGLES FROM INSERT TO OVERSTRIKE MODE. IF MODE
  3019.                        IS OVERSTRIKE THE CURSOR IS LARGE. INSERT MODE
  3020.                        IS THE DEFAULT EVERY TIME A FIELD IS ENTERED.
  3021.  
  3022.        RIGHT ARROW     MOVES THE CURSOR LEFT OR RIGHT.  ACTS THE SAME
  3023.        LEFT ARROW      AS TAB OR SHIFT TAB FOR "MULTINPT" IF THE
  3024.                        CURSOR IN IN POSITION 1 AND THE LEFT ARROW IS
  3025.                        PRESSED, OR THE CURSOR IS AT THE END OF THE
  3026.                        TEXT AND THE RIGHT ARROW IS PRESSED.
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.                                   43                                  
  3034.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.                          *****  DIRECTORY ROUTINES *****
  3044.  
  3045.          Directory routines compliment features included with
  3046.          QuickBASIC and BASIC 7.+ ( PDS )..  Procedures to find the
  3047.          current disk,  current path, disk capacity, and disk space
  3048.          available are supplied with WINDOWS R-E-Z.  Also included are
  3049.          routines to find the directory of any disk or path.  In
  3050.          addition a file's size, date, time, and attributes can be
  3051.          found.
  3052.  
  3053.          6.00 GETDISK (DRIVE%)
  3054.  
  3055.               Description: Retrieves the default disk drive.
  3056.  
  3057.               Argument:    DRIVE% is the current drive.  DRIVE% = 1
  3058.               for drive A:, 2 for B:, 3 for C:, 4 for D:, etc.
  3059.  
  3060.  
  3061.          6.01 FINDPATH (PATH$)
  3062.  
  3063.               NOTE: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING THIS
  3064.               ROUTINE.  SEE SECTION " MAKING A DIRECTORY SCROLL
  3065.               WINDOW"
  3066.  
  3067.               Description: Retrieves the current path ( directory ).
  3068.  
  3069.               Argument:    PATH$ is the path in the format:
  3070.  
  3071.                      DRIVE:\SUB-DIRECTORY\SUB-DIRECTORY\....
  3072.  
  3073.               PATH$ always starts with the drive letter and always
  3074.               ends with a "\".
  3075.  
  3076.  
  3077.          6.02 SETDISK (DRIVE%, BADFLAG%)
  3078.  
  3079.               Description: Changes the default drive.
  3080.  
  3081.               Arguments:   DRIVE% is the drive designation.  DRIVE% =
  3082.               1 for drive A:, 2 for B:, 3 for C:, etc.
  3083.  
  3084.                            BADFLAG% = 1 if DRIVE% is less than 1 or
  3085.               greater than the number of logical drives.  BADFLAG% = 0
  3086.               if DRIVE% is in the range from 1 to the number of logical
  3087.               drives in the system.
  3088.  
  3089.               NOTE: A SYSTEM WITH A FLOPPY DRIVE FOR DRIVE A: AND A
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.                                   44                                  
  3100.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.               HARD DISK FOR DRIVE C: HAS 3 LOGICAL DRIVES.  THEREFORE,
  3109.               BADFLAG% WILL = 0 IF DRIVE% = 1 TO 3 EVEN THOUGH A
  3110.               PHYSICAL DRIVE B: DOES NOT EXIST.  ATTEMPTS TO ACCESS
  3111.               DRIVE B: MAY RESULT IN THE DOS MESSAGE. "Place a disk in
  3112.               drive B: and press any key" BEING DISPLAYED.
  3113.  
  3114.  
  3115.          6.03 DISKSIZE (DRIVE%, SIZE&, FREE&)
  3116.  
  3117.               NOTE: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING THIS
  3118.               ROUTINE.  SEE SECTION " MAKING A SCROLL DIRECTORY
  3119.               WINDOW".
  3120.  
  3121.               Description: Retrieves disk space and disk free space.
  3122.  
  3123.               Arguments:   DRIVE% is the drive designation.  It
  3124.               follows the same rules as detailed in SETDISK.  The note
  3125.               for SETDISK applies.
  3126.  
  3127.                            SIZE& is the size in bytes of disk space.
  3128.  
  3129.                            FREE& is the size in bytes of free disk
  3130.               space.
  3131.  
  3132.               NOTE: THE ARGUMENTS FOR SIZE AND FREE SPACE ARE LONG
  3133.               INTEGERS.  ANY VARIABLE USED TO REPRESENT THEM MUST BE
  3134.               DESIGNATED AS A LONG INTEGER ( FOLLOWED BY A "&" SIGN )
  3135.               OR A PARAMETER MIS-MATCH WILL BE REPORTED.
  3136.  
  3137.  
  3138.          6.04 FINDDIR (PATH$, TYP$, FILE%)
  3139.  
  3140.               NOTE # 1: THE FOLLOWING MUST BE PLACED BEFORE ANY
  3141.               EXECUTABLE STATEMENTS IN ANY MODULE CALLING "FINDIR"
  3142.  
  3143.                 TYPE DIREC
  3144.                    SIZE AS LONG
  3145.                    DATE AS STRING * 10
  3146.                    TIME AS STRING * 6
  3147.                    ATTR AS INTEGER
  3148.                 END TYPE
  3149.                 COMMON SHARED /DIRECTORY/ DIREC$(), DIRINFO() AS DIREC
  3150.  
  3151.               NOTE # 2: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING
  3152.               THIS ROUTINE.  SEE SECTION " MAKING A SCROLL DIRECTORY
  3153.               WINDOW"
  3154.  
  3155.               Description:  Puts the directory listing of the
  3156.               specified path in an array, DIREC$().  If a long
  3157.               directory search is requested the files size, date, time
  3158.               and attributes are also placed in array, DIRINFO().  The
  3159.               arrays MUST be defined as explained above in NOTE # 1.
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.                                   45                                  
  3166.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.               Arguments:    PATH$ is the path for the directory
  3176.               listing search.  It must be in the same format as
  3177.               returned by the procedure FINDPATH.  It may be expanded
  3178.               to restrict the search.  Wildcards are permitted.
  3179.  
  3180.               EXAMPLE: IF PATH$ = "C:\TEST\*.BAS", THE SEARCH WILL
  3181.               FIND FILES IN DRIVE C:, SUB-DIRECTORY "TEST", WITH THE
  3182.               EXTENSION ".BAS".
  3183.  
  3184.                             TYP$ restricts or expands the search to
  3185.               include files with specified attributes.  An "L" in TYP$
  3186.               tells FINDDIR to make a long directory search.  The
  3187.               file's size, date, time and attributes are found in a
  3188.               long directory search, in addition to the files name,
  3189.               TYP$ may contain any combination of the following:
  3190.  
  3191.                            A - files archive bit set
  3192.                            H - hidden files
  3193.                            S - system files
  3194.                            R - read only files
  3195.                            D - sub-directory listings
  3196.                            V - volume entry
  3197.                            O - no file attribute
  3198.                            L - long directory search - SEE ABOVE
  3199.  
  3200.               EXAMPLE:  IF TYP$ = "HS" ONLY HIDDEN AND SYSTEM FILES
  3201.               WILL BE FOUND.
  3202.  
  3203.                            FILE% is the number of files found.  FILE% =
  3204.               0 if no files were found.
  3205.  
  3206.               If files are found their names are placed in the array,
  3207.               DIREC$().  A long directory search places the file's
  3208.               size, date, time and attrtibute designation in
  3209.               DIRINFO().
  3210.  
  3211.               DIREC$(1) = The name of first file found.
  3212.               DIRINFO(1).SIZE = The size of the file.
  3213.               DIRINFO(1).DATE = The files creation or last update date.
  3214.               DIRINFO(1).TIME = The files creation or last update time.
  3215.               DIRINFO(1).ATTR = The files attribute designation.
  3216.  
  3217.               The following describes DIRINFO(1).ATTR;
  3218.  
  3219.               IF DIRINFO(1).ATTR AND 1 the file is a read only file.
  3220.               IF DIRINFO(1).ATTR AND 2 the file is a hidden file.
  3221.               IF DIRINFO(1).ATTR  AND 4 the file is a system file.
  3222.               IF DIRINFO(1).ATTR  AND 8 the entry is a volumn entry.
  3223.               IF DIRINFO(1).ATTR  AND 16 the entry is a sub-directory.
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.                                   46                                  
  3232.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.               IF DIRINFO(1).ATTR  AND 32 the files archived bit is set.
  3242.               IF DIRINFO(1).ATTR  = 0 the file has no attribute.
  3243.  
  3244.               NOTE:  WHEN FINDDIR IS CALLED THE ARRAY, DIREC$() IS
  3245.               AUTOMATICALLY DIMENSIONED TO THE NUMBER OF FILES FOUND.
  3246.               THE ARRAY, DIRINFO() IS ALSO DIMENSIONED TO THE NUMBER
  3247.               OF FILES FOUND PROVIDING THE DIRECTORY SEARCH IS A LONG
  3248.               DIRECTORY SEARCH.  EACH FILE FOUND USES ABOUT 16 BYTES
  3249.               OF MEMORY PLUS AN ADDITIONAL 22 BYTES IF THE DIRECTORY
  3250.               SEARCH IS LONG.  TO RECLAIM THE MEMORY ( AFTER USING THE
  3251.               INFORMATION RETURNED BY THE CALL TO FINDDIR ) THE ARRAYS
  3252.               MUST BE ERASED VIA THE STATEMENT:
  3253.  
  3254.                            ERASE DIREC$, DIRINFO
  3255.  
  3256.  
  3257.  
  3258.  
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.  
  3267.  
  3268.  
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.                                   47                                  
  3298.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.                   ***** MAKING A DIRECTORY SCROLL WINDOW *****
  3308.  
  3309.               REM: THIS EXAMPLE FINDS THE DIRECTORY LISTING OF
  3310.               REM: ARCHIVED FILES IN DRIVE A.  IT PUTS THE LISTING IN
  3311.               REM: A SCROLL WINDOW AND WAITS FOR THE SELECTION OF A
  3312.               REM: FILE.
  3313.  
  3314.               TYPE DIREC                  ' REQUIRED IN ANY MODULE
  3315.                    SIZE AS LONG           ' USING DIRECTORY ROUTINES.
  3316.                    DATE AS STRING * 10
  3317.                    TIME AS STRING * 6
  3318.                    ATTR AS INTEGER
  3319.               END TYPE
  3320.               COMMON SHARED /DIRECTORY/ DIREC$(), DIRINFO() AS DIREC
  3321.  
  3322.               CALL SETWIND(1, 1, 7, 0, 1, 1, 1)  ' INITIALIZE
  3323.  
  3324.               START:
  3325.               CLS
  3326.               ON ERROR GOTO DISKERROR    ' ALWAYS TRAP FOR DISK
  3327.                                          ' ERRORS.
  3328.  
  3329.               REM: AS TYP$ INCLUDES AN "A",THE  FOLLOWING CALL TO
  3330.               REM: FINDDIR PLACES ARCHIVED FILES, FROM DRIVE A:,
  3331.               REM: ("A:\"), IN DIREC$().  AS TYP$ INCLUDES AN "L" THE
  3332.               REM: FILES SIZE, DATE, TIME AND ATTRIBUTES ARE PLACED IN
  3333.               REM: DIRINFO().  FILE% HOLDS THE NUMBER OF FILES FOUND.
  3334.  
  3335.               TYP$ ="AL"
  3336.               CALL FINDDIR ("A:\", TYP$, FILE%)
  3337.  
  3338.               IF FILE% > 0 THEN       ' ONLY IF FILES EXISTED.
  3339.  
  3340.                   REM: MAKE A WINDOW.  STATEMENT MUST BE ON 1 LINE
  3341.  
  3342.                   CALL MAKEWIND(1 ,"@Select file - Press ENTER",
  3343.                   100 ,100 ,30 ,10 ,15 ,101)
  3344.  
  3345.                   REM: MAKE IT AN AUTO-EXIT SCROLL WINDOW.
  3346.  
  3347.                   KIND$ ="A"                ' AUTO-EXIT FEATURE IS ON.
  3348.  
  3349.                   CALL SCRLWIND(DIREC$(), FILE%, KIND$, RTRN%, 0)
  3350.  
  3351.                   IF RTRN% <> 0 THEN
  3352.                       LOCATE 1,1
  3353.                       PRINT "FILE .......";DIREC$(RTRN%)
  3354.                       PRINT "SIZE........";DIRINFO(RTRN%).SIZE
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.                                   48                                  
  3364.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.                       PRINT "DATE........";DIRINFO(RTRN%).DATE
  3373.                       PRINT "TIME........";DIRINFO(RTRN%).TIME
  3374.                       PRINT "ATTRIBUTE...";DIRINFO(RTRN%).ATTR
  3375.                       ERASE DIREC$, DIRINFO
  3376.                    END IF
  3377.  
  3378.                    CALL RSTRWIND(1,1)        ' REMOVE THE WINDOW
  3379.  
  3380.                    IF RTRN%= 0 THEN GOTO START 'ESC WAS PRESSED
  3381.               ELSE             ' FILE% = 0 ( NO FILES WERE FOUND )
  3382.                    PRINT "NO FILES WERE FOUND" ENDIF
  3383.  
  3384.               ON ERROR GOTO 0             ' TURN OFF ERROR DETECTION
  3385.  
  3386.               END
  3387.  
  3388.               DISKERROR:
  3389.  
  3390.               REM: ERR = ERROR NUMBER. THIS ERROR HANDLING ROUTINE
  3391.               REM: WILL DETECT IF DISK IS NOT READY, NOT AVAILABLE,
  3392.               REM: OR PATH WAS BAD.
  3393.  
  3394.               SELECT CASE ERR
  3395.                  CASE 71
  3396.                     E$ = "DISK NOT READY"
  3397.                  CASE 68
  3398.                     E$ = "DISK NOT AVAILABLE"
  3399.                  CASE 76
  3400.                     E$ = "PATH NOT FOUND"
  3401.                  CASE ELSE
  3402.                     E$ = "UN-IDENTIFIED DISK ERROR"
  3403.               END SELECT
  3404.  
  3405.               REM: FOLLOWING MUST BE ON ONE LINE
  3406.  
  3407.               CALL GETANS("DISK ERROR: " + E$ + " Press any key.."
  3408.               ,"", "",100 ,100, 143, 1)
  3409.  
  3410.               RESUME START
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.                                   49                                  
  3430.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.                      ****  KEYBOARD AND MOUSE ROUTINES ****
  3440.  
  3441.          Adding the ability to "read the mouse" these routines provide
  3442.          increased flexibility over BASIC's INKEY$ statement.
  3443.  
  3444.          NOTE: THESE ARE ASSEMBLY ROUTINES.   ALWAYS PLACE THEM IN
  3445.                DECLARE STATEMENTS IN ANY MODULE WHICH USES THEM.  THIS
  3446.                WILL ASSURE ARGUMENT MATCHING AND PREVENT ACCIDENTAL
  3447.                PROGRAM "CRASHES".
  3448.  
  3449.          7.00 KEYMOUSE%
  3450.  
  3451.               Description: KEYMOUSE% is a function.  It pauses program
  3452.               execution.  Upon keyboard or mouse input the program
  3453.               resumes with the appropriate code returned in KEYMOUSE%.
  3454.               The mouse buttons are user defineable via the procedure
  3455.               MBUTTONS.  Mouse movement emulates the arrow keys.  Up,
  3456.               down, left, and right mouse movement places the same
  3457.               value in KEYMOUSE% as the corresponding arrow key.  If
  3458.               the key or mouse button pressed produces a standard
  3459.               ASCII/IBM character, the code for the character ( 1 to
  3460.               255 ) is returned in KEYMOUSE%.   If the key pressed, or
  3461.               mouse movement, produces an extended scan code such as
  3462.               the up arrow, the extended scan code for the key
  3463.               multiplied by 256 is returned in KEYMOUSE%.  KEYMOUSE%
  3464.               returns  18432 ( 72 * 256 ) for the up arrow.  For those
  3465.               keys which produce an extended scan code over 127, such
  3466.               as CTRL-PGUP ( 129 ), KEYMOUSE% returns a negative
  3467.               value.  SEE THE KEYMOUSE CODE CHART IN THE APPENDIX.
  3468.  
  3469.               -------------------------------------------------------
  3470.               'EXAMPLE: WAITS FOR RETURN, "A", DOWN ARROW, OR END.
  3471.               'PRESS END TO END
  3472.                DECLARE FUNCTION KEYMOUSE%
  3473.  
  3474.               INPT:
  3475.               A% = KEYMOUSE%        ' PROGRAM WAITS FOR INPUT HERE
  3476.               SELECT CASE A%
  3477.                  CASE 13            ' 13 IS ASCII FOR THE RETURN KEY
  3478.                    PRINT "RETURN"
  3479.                  CASE 65            ' 65 IS ASCII FOR "A"
  3480.                    PRINT "A"
  3481.                  CASE 80 * 256          ' 80 IS THE EXTENDED SCAN
  3482.                    PRINT "DOWN ARROW"   ' CODE FOR THE DOWN ARROW.
  3483.                  CASE 79 * 256          ' 79 IS THE EXTENDED SCAN
  3484.                    PRINT "END"          ' FOR END.
  3485.                    END
  3486.                  CASE ELSE
  3487.                    GOTO INPT
  3488.               END SELECT
  3489.               GOTO INPT
  3490.               --------------------------------------------------------
  3491.  
  3492.  
  3493.  
  3494.  
  3495.                                   50                                  
  3496.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.          7.01 MBUTTONS% ( LBUTTON%, RBUTTON%)
  3506.  
  3507.               NOTE: THIS ROUTINE MUST BE CALLED AT LEAST ONCE IN ANY
  3508.               PROGRAM BEFORE ATTEMPTING TO USE THE MOUSE.
  3509.  
  3510.               Description:  Sets the values which will be placed in
  3511.               function KEYMOUSE% for the left and right mouse buttons.
  3512.  
  3513.               Arguments: LBUTTON% sets the value which will be
  3514.               returned in function KEYMOUSE% when te left mouse button
  3515.               is pressed. It may range from 0 to 255.  If LBUTTON% is
  3516.               greater than 255 it is converted to LBUTTON% AND 255
  3517.  
  3518.                          RBUTTON% sets the value which will be
  3519.               returned in function KEYMOUSE% when te right mouse
  3520.               button is pressed. It may range from 0 to 255.  If
  3521.               RBUTTON% is greater than 255 it is converted to
  3522.               LBUTTON% and 255.
  3523.               --------------------------------------------------------
  3524.               ' EXAMPLE: SETS THE LEFT MOUSE BUTTON TO "RETURN" AND
  3525.               ' THE RIGHT MOUSE BUTTON TO "ESC". 13 IS THE ASCII CODE
  3526.               ' FOR "RETURN".  27 IS THE ASCII CODE FOR "ESC".
  3527.  
  3528.               DECLARE SUB MBUTTONS ( LBUTTON%, RBUTTON% )
  3529.  
  3530.               CALL MBUTTON ( 13, 27 )
  3531.               --------------------------------------------------------
  3532.  
  3533.          7.02 MOUSEON (ISON%)
  3534.  
  3535.               NOTE: THIS ROUTINE MUST BE CALLED AT LEAST ONCE IN ANY
  3536.               PROGRAM BEFORE ATTEMPTING TO USE THE MOUSE.
  3537.  
  3538.               Description: Sets the mouse status.
  3539.  
  3540.               Arguments: ISON% sets the mouse status as follows:
  3541.  
  3542.               If ISON% = 0 the mouse is off.
  3543.               If ISON% = 1 the mouse is on.
  3544.               If ISON% = 2 the mouse buttons remain active
  3545.               but mouse movement detection is disabled.
  3546.  
  3547.               Any other value for ISON% sets the mouse to on.
  3548.          -------------------------------------------------------------
  3549.  
  3550.          8.00 DOSOUND
  3551.  
  3552.               Description:  Makes the default sound ,or sound as
  3553.               specified by a previous call to SETWIND.
  3554.  
  3555.               Arguments:    None.
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.                                   51                                  
  3562.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.                          PROGRAM FORMAT FOR WINDOWS R-E-Z
  3573.  
  3574.           ** NOTE: ALL NUMERIC VALUES MUST BE INTEGERS FOR ALL **
  3575.              PROCEDURES EXCEPT DISKSIZE. ( EX: A%, B%, DEFINT A-F )
  3576.  
  3577.               1. LOAD QUICKBASIC WITH CORRECT LIBRARY.
  3578.  
  3579.                  - UNENHANCED VERSION:
  3580.  
  3581.                  EX: QB/L QB4UNEN.QLB  ( QB 4.00, 4.00b, 4.50 )
  3582.                      QBX/L PDSUNEN.QLB  ( BASIC 7.0, 7.1 - PDS )
  3583.  
  3584.                  - ENHANCED VERSION:
  3585.  
  3586.                  EX: QB/L QB4ALL.QLB  ( QB 4.00, 4.00b, 4.50 )
  3587.                      QBX/L PDSALL70.QLB  ( BASIC 7.0 - PDS )
  3588.                      QBX/L PDSALL71.QLB  ( BASIC 7.1 - PDS )
  3589.  
  3590.               2. DECLARE ALL SUB-ROUTINES AND FUNCTIONS.
  3591.  
  3592.                  REM $INCLUDE: 'DECLARE.INC'
  3593.  
  3594.              ' 3. CALL SETWIND TO INITIALIZE WINDOW MEMORY, TURN
  3595.              '    THE MOUSE ON AND SET MOUSE KEYS.
  3596.  
  3597.                  CALL SETWIND(1,1,7,0,1,1,1) 'FAST WINDOWS
  3598.                                              'SOUND DEFAULTS TO "CLICK"
  3599.                                              'SHADOW COLOR = GRAY
  3600.                                              'HIGH INTENSITY IS OK
  3601.                                              'PERIOD AS DECIMAL POINT
  3602.                                              'SCROLL ARROW DISPLAYED
  3603.                                              'DATE = MM-DD-YYYY
  3604.  
  3605.                  CALL MOUSEON (1)            'MOUSE IS ON
  3606.                  CALL MBUTTONS (13,27)       'LEFT BUTTON = ENTER
  3607.                                              'RIGHT BUTTON = ESC
  3608.  
  3609.              ' 4. CALL SETPULL IF PULLDOWN WINDOWS ARE USED
  3610.  
  3611.                  BAR$ = "THIS IS A SAMPLE"         ' DEFINE MENUBAR
  3612.                  A%= 25
  3613.                  DIM PWIND$(A%)                     ' SET TEMPORARY
  3614.                                                    ' ARRAY
  3615.                  TEMP%=0
  3616.                  WHILE PWIND$(TEMP%) <> "ENDPULL"
  3617.                     TEMP% = TEMP% + 1              ' ALWAYS START AT 1
  3618.                     READ PWIND$(TEMP%)             ' READ DATA FOR
  3619.                  WEND                              ' PULLDOWN WINDOWS.
  3620.  
  3621.                  CALL SETPULL (1, 1, 80, BAR$, PWIND$()) ' CALL SETPULL
  3622.                  ERASE PWIND$                            ' AND ERASE ARRAY
  3623.  
  3624.  
  3625.  
  3626.  
  3627.                                   52                                  
  3628.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.                  ' PULLDOWN WINDOW DATA
  3638.                  DATA HELLO,JOE,***
  3639.                  DATA HOW,ARE,YOU,***
  3640.                  DATA I,AM,FINE,***
  3641.                  DATA BYE,***
  3642.                  DATA ENDPULL
  3643.  
  3644.                  ON KEY(1) GOSUB PULL              ' MAKE THE F1 KEY
  3645.                                                    ' THE "HOT" KEY FOR
  3646.                                                    ' PULLDOWN WINDOWS
  3647.  
  3648.               '5. READ DATA FOR SCROLL WINDOW(S)
  3649.  
  3650.                  DIM LIST$(10)                     ' DIMENSION ARRAY
  3651.                  FOR X%= 1 TO 10                   ' AND READ SCROLL
  3652.                   READ LIST$(X%)                   ' WINDOW DATA
  3653.                  NEXT
  3654.  
  3655.                  DATA ONE, TWO, THREE, FOUR, FIVE  ' DATA FOR A SCROLL
  3656.                  DATA SIX, SEVEN, EIGHT, NINE, TEN ' WINDOW
  3657.  
  3658.  
  3659.               '6. READ DATA FOR MULTI-FIELD INPUT SCREEN(S)
  3660.  
  3661.                  A%=20
  3662.                  B%=3
  3663.                  DIM INPT%(A%),INPT$(B%)         ' TEMPORARY ARRAYS
  3664.  
  3665.                  TEMP% = 1                       ' ALWAYS START AT 1
  3666.                  FLD%=1
  3667.                  DO
  3668.                    READ INPT%(TEMP%)             ' READ CODE%.
  3669.                                                  ' IF CODE%=9999 DONE.
  3670.                    IF INPT%(TEMP%)=9999 THEN EXIT DO
  3671.                    TEMP%=TEMP%+1
  3672.                    FOR X%=1 TO 5                 ' READ REMAINING 5
  3673.                      READ INPT%(TEMP%)           ' NUMERIC VALUES IN
  3674.                                                  ' INPT%().
  3675.                      TEMP% = TEMP% + 1
  3676.                    NEXT
  3677.                    READ INPT$(FLD%)               ' READ FIELD DATA IN
  3678.                    FLD%=FLD%+1                    ' INPT$() - RESTRICT
  3679.                  LOOP                             ' DATA.
  3680.  
  3681.  
  3682.                  ' MULTI- FIELD INPUT DATA
  3683.  
  3684.                  DATA 0,1,1,15,7,99,""
  3685.                  DATA 11007,3,1,40,7,99,""
  3686.                  DATA 108,5,1,10,32,99,""
  3687.                  DATA 9999
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.                                   53                                  
  3694.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.                  CALL SETINPT( 1, 80, "12", INPT%(), INPT$(),0 ) ' SET INPUT
  3704.                                                                  ' SCREEN.
  3705.  
  3706.                  ERASE INPT%,INPT$             ' GET THE MEMORY BACK
  3707.  
  3708.              '7. ENTER THE PROGRAM
  3709.  
  3710.                  MAIN:
  3711.                  KEY (1) ON                 ' TURN ON "HOT" KEY AT
  3712.               '  .                          ' APPROPRIATE SPOT IN
  3713.               '  .                          ' PROGRAM.
  3714.               '  .                          ' WAIT FOR F1 KEY.
  3715.                  GOTO MAIN
  3716.  
  3717.                  REM  PULL IS A SUB ROUTINE WHICH IS ENTERED VIA THE
  3718.                  REM  F1 KEY BEING PRESSED.  THIS SUB DISPLAYS THE
  3719.                  REM  PULLDOWN WINDOW AND WAITS FOR AN ITEM TO BE
  3720.                  REM  SELECTED FROM SAME.  IF THE ESC KEY IS PRESSED
  3721.                  REM  THE PROGRAM RESUMES EXECUTION WHERE IT WAS
  3722.                  REM  INTERRUPTED BY THE F1 KEY.  IF AN ITEM IS
  3723.                  REM  SELECTED A ROUTINE IS EXECUTED.  AFTER EXECUT-
  3724.                  REM  ION THE PROGRAM CONTINUES AT MAIN.
  3725.                  REM  THIS IS A SUGGESTION FOR A METHOD TO USE PULL-
  3726.                  REM  DOWN WINDOWS.  ALTERNATE METHODS MAY BE USED,
  3727.                  REM  SUCH AS CALL "PULLDOWN" AT START OF PROGRAM.
  3728.                  REM  AND NOT USING A HOT KEY.
  3729.  
  3730.                  PULL:
  3731.                  KEY (1) OFF
  3732.                  CALL PULLDOWN (MENUITEM% , WINDITEM%, 112, 0, 11)
  3733.  
  3734.                  SELECT CASE MENUITEM%
  3735.  
  3736.                   CASE 1                      ' MENUBAR ITEM = THIS
  3737.                     SELECT CASE WINDITEM%
  3738.                       CASE 1                  ' HELLO
  3739.                '       .                      ' ROUTINE FOR HELLO
  3740.                '       .
  3741.                       CASE 2                  ' JOE
  3742.                '       .                      ' ROUTINE FOR JOE
  3743.                '       .
  3744.                     END SELECT
  3745.  
  3746.                   CASE 2                      ' MENUBAR ITEM = IS
  3747.                     SELECT CASE WINDITEM%
  3748.                       CASE 1                  ' HOW
  3749.                 '      .                      ' ROUTINE FOR HOW
  3750.                 '      .
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.                                   54                                  
  3760.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.                       CASE 2                  ' ARE
  3769.                 '      .                      ' ROUTINE FOR ARE
  3770.                 '      .
  3771.                       CASE 3                  ' YOU
  3772.                 '      .                      ' ROUTINE FOR YOU
  3773.                 '      .
  3774.                     END SELECT
  3775.  
  3776.                   CASE 3                      ' MENUBAR ITEM = A
  3777.                     SELECT CASE WINDITEM%
  3778.                       CASE 1                  ' I
  3779.                 '      .                      ' ROUTINE FOR I
  3780.                 '      .
  3781.                       CASE 2                  ' AM
  3782.                 '      .                      ' ROUTINE FOR AM
  3783.                 '      .
  3784.                       CASE 3                  ' FINE
  3785.                 '      .                      ' ROUTINE FOR FINE
  3786.                 '      .
  3787.                     END SELECT
  3788.  
  3789.                   CASE 4                      ' MENUBAR ITEM = SAMPLE
  3790.                 '      .                      ' ROUTINE FOR SAMPLE
  3791.                 '      .                      ' ( OR BYE )
  3792.  
  3793.                   CASE ELSE                   ' MUST BE THE ESC
  3794.                     KEY (1) ON                ' KEY
  3795.                     RETURN MAIN
  3796.  
  3797.                  END SELECT
  3798.                     KEY (1) ON
  3799.                     RETURN MAIN                ' DONE WITH THE ROUTINE
  3800.                                                ' SELECTED FROM
  3801.                                                ' PULLDOWN WINDOWS
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.                                   55                                  
  3826.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.                         MAKING A CUSTOMIZED LIBRARY
  3836.                          ( Enhanced version only )
  3837.  
  3838.               Users familiar with LINK and LIB utilities may prefer to
  3839.           create libraries outside of QuickBASIC's environment using
  3840.           the appropriate object files.  As individual assembly object
  3841.           files can be linked together to create smaller libraries
  3842.           this is the preferable method.  See the section "FILES" for
  3843.           a description of all files.
  3844.               The libraries ( QB4ALL.QLB, PDSALL70.QLB, PDSALL71.QLB,
  3845.           QB4ALL.LIB, PDSALL70.LIB and PDSALL71.LIB ) are complete and
  3846.           contain all of the procedures in WINDOWS R-E-Z.  If all of
  3847.           the procedures are not required in your program customized
  3848.           libraries using less memory may be made in the QuickBASIC
  3849.           environment as follows:
  3850.  
  3851.           For QB 4.00 and 4.00b:
  3852.  
  3853.           1. Load QuickBASIC using the command QB/L QB4ASM.  The file,
  3854.              QB4ASM.QLB, contains the assembly routines required by
  3855.              all of the other procedures.
  3856.  
  3857.           2. Load the modules  WIND_REZ.BAS and QB4MEM.BAS. ALL
  3858.              PROCEDURES EXCEPT THOSE IN DIRWIND.BAS REQUIRE THESE
  3859.              MODULES.  They contain the basic windowing routines.  If
  3860.              this is all your program requires select the Make library
  3861.              option from the Run menu in QuickBASIC (see your manual)
  3862.              to make the library. ( QB4ASM.LIB must be present.)
  3863.  
  3864.           3. Load any other modules your program requires.  IF YOU
  3865.              WANT TO USE PULLDOWN WINDOWS THE MODULES PULLDOWN.BAS
  3866.              AND SCROLL.BAS MUST BOTH BE LOADED.  All other
  3867.              modules may be loaded independent of each other.
  3868.              When all of the modules you will be using are loaded
  3869.              make the library as in step 2.
  3870.  
  3871.           Two libraries will be produced.  The library with the suffix
  3872.           .QLB is used in the QuickBASIC environment and the library
  3873.           with the suffix .LIB must be available to produce an
  3874.           executable file.  To use your new library ( assuming a name
  3875.           of NEWLIB.QLB ) exit QuickBASIC and reload with the command
  3876.           QB/L NEWLIB.
  3877.  
  3878.           For QuickBASIC version 4.50 and BASIC 7.+ ( PDS );
  3879.  
  3880.           Versions 4.5 of QuickBasic and BASIC 7.0+ ( PDS ) do not use
  3881.           the "full library" mode while linking.  Therefore it is not
  3882.           nesessary to build a customized library or link outside of
  3883.           the QuickBASIC environment to produce the smallest possible
  3884.           executable programs.
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.                                   56                                  
  3892.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.                                      FILES
  3902.  
  3903.               The following files are included with WINDOWS R-E-Z.
  3904.           Files starting with "QB4" are for use with QB 4.00, QB 4.00b
  3905.           and QB 4.50. These files are not included with WINDOWS R-E-Z
  3906.           for BASIC 7.+ ( PDS ).  Files starting with "PDS" are for
  3907.           use with BASIC 7.+, ( PDS ) These files are not included
  3908.           with WINDOWS R-E-Z for QB 4.+.
  3909.  
  3910.           Library Files:
  3911.  
  3912.           - Library consisting of all assembly procedures.
  3913.  
  3914.            *  QB4ASM.LIB --  For QuickBASIC 4.+
  3915.            *  PDSASM.LIB --  For BASIC 7.+
  3916.  
  3917.           - QuickBASIC version of QB4ASM.LIB or PDSASM.LIB
  3918.  
  3919.            *  QB4ASM.QLB --  For QuickBASIC 4.+
  3920.            *  PDSASM.QLB --  For BASIC 7.+
  3921.  
  3922.           - Library consisting of all assembly and BASIC procedures.
  3923.  
  3924.            *  QB4ALL.LIB --- For QuickBASIC 4.+
  3925.            *  PDSALL70.LIB - For Basic 7.0
  3926.            *  PDSALL71.LIB - For Basic 7.1
  3927.           **  QB4UNEN.LIB -- For QuickBASIC 4.+  ( unenhanced )
  3928.           **  PDSUNEN.LIB -- For BASIC 7.+       ( unenhanced )
  3929.  
  3930.           - QuickBASIC version of QB4ALL.LIB, PDSALL70.QLB or
  3931.             PDSALL71.QLB.
  3932.  
  3933.            *  QB4ALL.QLB --- For QuickBASIC 4.+
  3934.            *  PDSALL70.QLB - For BASIC 7.0
  3935.            *  PDSALL71.QLB - For BASIC 7.1
  3936.           **  QB4UNEN.QLB -- For QuickBASIC 4.+  ( unenhanced )
  3937.           **  PDSUNEN.QLB -- For BASIC 7.+       ( unenhanced )
  3938.  
  3939.           - Library of all assembly and BASIC procedures without
  3940.             error detection or window status.  Program MUST be
  3941.             completely "debugged" before these are used.
  3942.  
  3943.            *  QB4NER.LIB --- For QuickBASIC 4.+
  3944.            *  PDSNER70.LIB - For BASIC 7.0
  3945.            *  PDSNER71.LIB - For BASIC 7.1
  3946.  
  3947.           - QuickBASIC version of QB4NER.LIB, PDSNER70.LIB or
  3948.             PDSNER71.LIB.
  3949.  
  3950.            *  QB4NER.QLB --- For QuickBASIC 4.+
  3951.            *  PDSNER70.QLB - For BASIC 7.0
  3952.            *  PDSNER71.QLB - For BASIC 7.1
  3953.  
  3954.  
  3955.  
  3956.  
  3957.                                   57                                  
  3958.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.           Object Files:
  3968.  
  3969.            *  QB4WIND.OBJ -- Object file of assembly windowing
  3970.            *  PDSWIND.OBJ    routines.
  3971.            *  QB4INPT.OBJ -- Object file of assembly input routines.
  3972.            *  PDSINPT.OBJ    "                                    "
  3973.            *  QB4INPT2.OBJ   "                                    "
  3974.            *  PDSINPT2.OBJ   "                                    "
  3975.            *  QB4DIR.OBJ --- Object file of assembly directory
  3976.            *  PDSDIR.OBJ     routines.
  3977.            *  QB4SCRL.OBJ -- Object file of assembly scroll routines.
  3978.            *  PDSSCRL.OBJ    "                                    "
  3979.            *  PDSMEM70.OBJ -- Alternate memory management module.
  3980.            *  PDSMEM71.OBJ -- "                                 "
  3981.  
  3982.           Basic Files:
  3983.  
  3984.               DEMO.BAS ----- Source code for demonstration program.
  3985.            *  INPTWIND.BAS - BASIC source code for routines in
  3986.            *  PULLDOWN.BAS   WINDOWS R-E-Z.
  3987.            *  SCROLL.BAS           "
  3988.            *  WIND_REZ.BAS         "
  3989.            *  DIRWIND.BAS          "
  3990.            *  QB4MEM.BAS                        ( QuickBASIC 4.+ )
  3991.            *  PDSMEM.BAS                        ( BASIC 7.+ )
  3992.               MULTSAM1.BAS   Sample multi-field input program
  3993.               MULTSAM2.BAS         "
  3994.               MULTSAM3.BAS         "
  3995.  
  3996.            NOTE:  All BASIC files except QB4MEM.BAS and PDSMEM.BAS are
  3997.                   the same for QuickBASIC 4.+  and  BASIC 7.0/7.1. All
  3998.                   basic routines, except those in DIRWIND.BAS, require
  3999.                   the presence of the module WIND_REZ.BAS.
  4000.  
  4001.           Other Files:
  4002.  
  4003.               WIND_REZ.DOC - This document.
  4004.               PRNT.BAT ----- Batch file for printing WIND_REZ.DOC.
  4005.               LAZPRNT.BAT -- Batch file for printing WIND_REZ.DOC on a
  4006.                              HP compatible lazer printer.
  4007.               DECLARE.INC -- INCLUDE file containing DECLARE
  4008.                              statements for all routines.
  4009.               ORDER.ME ----- Order form for WINDOWS R-E-Z.
  4010.               READ.ME  ----- Update information.
  4011.            *  QUICKREF.DOC - Quick reference guide.
  4012.            *  PRNT2.BAT ---- Batch file for printing QUICKREF.DOC.
  4013.            *  LAZRRNT2.BAT - Batch file for printing QUICKREF.DOC on a
  4014.                              HP compatible lazer printer.
  4015.  
  4016.  
  4017.  
  4018.            * Not included with the unenhanced version of WINDOWS R-E-Z.
  4019.           ** Not included with the enhanced version of WINDOWS R-E-Z.
  4020.  
  4021.  
  4022.  
  4023.                                   58                                  
  4024.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.                                      Errors
  4034.  
  4035.           The following is a listing of the errors WINDOWS R-E-Z
  4036.           will detect.
  4037.  
  4038.           ERROR #       DESCRIPTION
  4039.           ------------------------------------------------------------
  4040.  
  4041.           ERROR 0       There is no active window.  SCRLWIND, RESAVE
  4042.                         CLRWIND, PRINTW, LINEW, and NEWCOLOR require
  4043.                         an active window.
  4044.  
  4045.           ERROR 1       SETWIND has not been called to initialize
  4046.                         window memory.  This error will be reported if
  4047.                         the program uses a CLEAR statement and SETWIND
  4048.                         has not be called to re-initialize window
  4049.                         memory.
  4050.  
  4051.           ERROR 2       A window number has been specified which is
  4052.                         out of range for the calling routine.  Window
  4053.                         number 20 is the maximum window number for all
  4054.                         routines.  Window number 1 is the minimim
  4055.                         window number for SAVEWIND, DELWIND, and
  4056.                         RSTRWIND.  Window number 0 is the minimum
  4057.                         window number for MAKEWIND and CHNGWIND.
  4058.  
  4059.           ERROR 3       The shadow, specified in a call to MAKEWIND,
  4060.                         will not fit on the screen.  If this error is
  4061.                         displayed the window will fit on the screen
  4062.                         but the shadow will not.
  4063.  
  4064.           ERROR 4       The window will not fit on the screen.  The
  4065.                         left column plus the window's width makes the
  4066.                         window too wide or the top row plus the number
  4067.                         of rows makes the window too tall.  The left
  4068.                         column and top row must be greater than 0.
  4069.                         GETANS makes a window with a width predicated
  4070.                         on the width of the prompt.  INPTWIND makes a
  4071.                         window with a width based on the length of the
  4072.                         prompt plus the width of the input field.
  4073.                         PULLDOWN windows have a width based on the
  4074.                         longest item in the pulldown window's list.
  4075.                         This error is displayed for INPTWIND and
  4076.                         GETANS if no window is specified ( BORDER%=0 )
  4077.                         and the width of the prompt and/or field will
  4078.                         not fit on the screen.
  4079.  
  4080.           ERROR 5       The border designation is not valid for the
  4081.                         calling routine.  GETANS does not allow title
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.                                   59                                  
  4090.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.                         windows.  PULLDOWN does not allow title
  4099.                         windows and only allows right-bottom shadows.
  4100.                         SEE THE BORDER DESIGNATION CHART.
  4101.  
  4102.           ERROR 6       A request was made to CHNGWIND to make the
  4103.                         active window a non-existent window or a
  4104.                         window saved via SAVEWIND.  The active window
  4105.                         can only be a window save by MAKEWIND.
  4106.  
  4107.           ERROR 7       A call was made to RESAVE when the active
  4108.                         window was window number 0.  RESAVE can only
  4109.                         resave active window 1 to 20.
  4110.  
  4111.           ERROR 8       An window specified in a call to MAKEWIND or
  4112.                         SAVEWIND previouly existed.  A window must be
  4113.                         deleted via a call to DELWIND or RSTRWIND
  4114.                         before the number assigened to it can be used
  4115.                         again.  This error will not be reported for
  4116.                         window number 0 as it is not saved.
  4117.  
  4118.           ERROR 11      A bad row number was specified in a call to
  4119.                         PRINTW or LINEW.  The row number must be
  4120.                         greater than 0.  PRINTW allows print on the
  4121.                         bottom border.  LINEW does not.  The string
  4122.                         specified in a call to PRINTW will not fit in
  4123.                         the window due to it's length or it's left
  4124.                         column ( start print ) position.
  4125.  
  4126.           ERROR 21      The array ( LIST$() ) in a call to SCRLWIND
  4127.                         has a lower dimension greater than 1 or an
  4128.                         upper dimension less then the number of
  4129.                         entries ( ENTRIES% ) in the list.
  4130.  
  4131.           ERROR 22      A call was made to SCRLWIND with less than one
  4132.                         entry ( ENTRIES% ).
  4133.  
  4134.           ERROR 23      A scroll window requires a minimum width of 5.
  4135.  
  4136.           ERROR 24      At least one of the strings in the list for a
  4137.                         scroll window ( SCRLWIND ) will not fit in the
  4138.                         window, allowing for a space on either side of
  4139.                         the string.
  4140.  
  4141.           ERROR 31      The menubar string specified in a call to
  4142.                         SETPULL is missing or has the wrong format.
  4143.  
  4144.           ERROR 32      The menubar string specified in a call to
  4145.                         SETPULL has over 10 items in it.  A space
  4146.                         between two characters is the separator for
  4147.                         the items.
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.                                   60                                  
  4156.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.           ERROR 33      The data supplied to SETPULL is in the wrong
  4166.                         format.  The end of each pulldown window must
  4167.                         be represented by "***" in the data stream.
  4168.                         The end for all pulldown windows must be
  4169.                         represented by "ENDPULL".  A pulldown window
  4170.                         entry is a null string.
  4171.  
  4172.           ERROR 34      The row or left column position is out of
  4173.                         range for the routine SETPULL.  The row
  4174.                         position may equal 1 to 21 and left column
  4175.                         positon may range from 1 to 73.
  4176.  
  4177.           ERROR 35      There are no items in a pulldown window.  Two
  4178.                         consecutive "***"'s may be in the data stream.
  4179.  
  4180.           ERROR 36      The menubar has less than 2 items in it.
  4181.                         There must be spaces between the items.
  4182.  
  4183.           ERROR 37      The manubar specified in a call to SETPULL is
  4184.                         too long to fit on the display.  Two spaces
  4185.                         are placed between items in the menubar. Two
  4186.                         spaces pad the beginning and one space is
  4187.                         added to the end of the menubar.
  4188.  
  4189.           ERROR 41      The requested width of in input field in
  4190.                         INPTWIND is out of range.  The maximum width
  4191.                         is 15 for numeric fields, the screens width
  4192.                         minus 4 for windowed ALPHA/NUMERIC fields or
  4193.                         the screens width minus 1 for un-windowed
  4194.                         ALPHA/NUMERIC fields.  The minimum width for a
  4195.                         numeric field is the number of decimal places
  4196.                         plus one.  The minimum width for an ALPHA-
  4197.                         NUMERIC field is 1.  A date field must have a
  4198.                         width of 8 or 10.
  4199.  
  4200.           ERROR 42      The field code in INPTWIND does not consist of
  4201.                         legal characters. ("0","1","2","3","4","5","6",
  4202.                          "A","L","U","D","P0","P1","P2","P3","P4","P5,
  4203.                         or "P6 )
  4204.  
  4205.           ERROR 51      The screen number in MULTINPT is less than one
  4206.                         or over 10.
  4207.  
  4208.           ERROR 52      The array ( RTRN$() ) specified in a call to
  4209.                         MULTINPT has a lower dimension of greater than
  4210.                         one or an upper dimension less than the number
  4211.                         of fields in the multi-field input screen.
  4212.  
  4213.           ERROR 53      The screen number in a call to MULTINPT was
  4214.                         not defined via a call to SETINPT.
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.                                   61                                  
  4222.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.           ERROR 54      The field number specified in call to MULTINPT
  4232.                         is greater than the number of fields in the
  4233.                         multi-field input screen or less than one.
  4234.                         The auto-exit field is greater than the number
  4235.                         of fields in the multi-field input screen or
  4236.                         less than 0.
  4237.  
  4238.           ERROR 55      The screen width when MULTINPT was called was
  4239.                         not the same as specified when the multi-field
  4240.                         input screen was defined by SETINPT.
  4241.  
  4242.           ERROR 61      The screen number in a call to SETINPT is less
  4243.                         than one or greater than 10.
  4244.  
  4245.           ERROR 62      The screen width in a call to SETINPT is not
  4246.                         80 or 40.
  4247.  
  4248.           ERROR 63      The exit string ( EXIT$ ) in a call to SETINPT
  4249.                         is null or contains an illegal character.
  4250.                         Legal character are:  "1234567890EUD".
  4251.  
  4252.           ERROR 64      The input data ( INPT%(), INPUT$() ) is not in
  4253.                         the correct format in a call to SETWIND.
  4254.  
  4255.           ERROR 65      Over 100 fields were defined in a call to
  4256.                         SETINPT.
  4257.  
  4258.           ERROR 66      Less than 2 fields were defined in a call to
  4259.                         SETINPT.
  4260.  
  4261.           ERROR 67      At least one field in a call to SETINPT has an
  4262.                         illegal field code.  SEE THE MULTI-FIELD CODE
  4263.                         CHART.
  4264.  
  4265.           ERROR 68      The field width is not appropriate for the
  4266.                         type of field specified in a call to SETINPT.
  4267.  
  4268.           ERROR 69      The left position plus the width of a field
  4269.                         defined in a call to SETINPT will not allow
  4270.                         the field to fit on the screen.  The row or
  4271.                         column position is less than one.  The row
  4272.                         position of a field is greater than 26.
  4273.  
  4274.           ERROR 70      All fields defined in a call to SETINPT are
  4275.                         protected fields.  No input is possible.
  4276.  
  4277.           ERROR 71      The cumulative total of restrict characters
  4278.                         for all fields for a multi-field input screen
  4279.                         defined via SETINPT is greater than 1023.
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.                                   62                                  
  4288.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.           ERROR 72      The number of characters in a restrict string
  4298.                         ( INPT$() ) for an individual field defined
  4299.                         in a call to SETINPT is greater than 255.
  4300.  
  4301.           ERROR 73      The array ( INPT$() ) in SETINPT, which
  4302.                         defines the field's restrict strings is
  4303.                         dimensioned less than the number of fields or
  4304.                         has a lower dimension greater than one.
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.  
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.                                   63                                  
  4354.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.                                    APPENDIX I
  4364.  
  4365.                                Color Attribute Chart
  4366.  
  4367.           ATTRIBUTE                 BACKGROUND              FOREGROUND
  4368.  
  4369.           START     END
  4370.  
  4371.           0  ------ 15               BLACK                  NORMAL
  4372.           16 ------ 31               BLUE                   NORMAL
  4373.           32 ------ 47               GREEN                  NORMAL
  4374.           48 ------ 63               CYAN                   NORMAL
  4375.           64 ------ 79               RED                    NORMAL
  4376.           80 ------ 95               MAGENTA                NORMAL
  4377.           96 ------ 111              BROWN                  NORMAL
  4378.           112 ----- 127              LIGHT GRAY             NORMAL
  4379.           128 ----- 143              BLACK                  FLASHING
  4380.           144 ----- 159              BLUE                   FLASHING
  4381.           160 ----- 175              GREEN                  FLASHING
  4382.           176 ----- 191              CYAN                   FLASHING
  4383.           192 ----- 207              RED                    FLASHING
  4384.           208 ----- 223              MAGENTA                FLASHING
  4385.           224 ----- 239              BROWN                  FLASHING
  4386.           240 ----- 255              LIGHT GRAY             FLASHING
  4387.           -----------------------------------------------------------
  4388.           OFFSET FROM START                                 FOREGROUND
  4389.  
  4390.           0                                                 BLACK
  4391.           1                                                 BLUE
  4392.           2                                                 GREEN
  4393.           3                                                 CYAN
  4394.           4                                                 RED
  4395.           5                                                 MAGENTA
  4396.           6                                                 BROWN
  4397.           7                                                 LIGHT GRAY
  4398.           8                                                 DARK GRAY
  4399.           9                                                 LIGHT BLUE
  4400.           10                                                LIGHT GREEN
  4401.           11                                                LIGHT CYAN
  4402.           12                                                LIGHT RED
  4403.           13                                                LIGHT MAGENTA
  4404.           14                                                YELLOW
  4405.           15                                                WHITE
  4406.  
  4407.  
  4408.           EXAMPLE: If the attribute = 242 then the background color is
  4409.                    light gray and the foreground flashes.  The offset
  4410.                    from start = 242 - 240 or 2, so the foreground color
  4411.                    is green.
  4412.  
  4413.           NOTE: GETANS and SCRLWIND allow a flashing border only.
  4414.           CHNGPULL, PULLDOWN, AND MULTINPT will not allow a flashing
  4415.           border or text.
  4416.  
  4417.  
  4418.  
  4419.                                   64                                  
  4420.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.                                    APPENDIX II
  4430.  
  4431.                              Multi-field code chart
  4432.  
  4433.  
  4434.           The code for each field can be up to five digits long.  The
  4435.           digits are numbered 5,4,3,2 and 1, with 1 being the least
  4436.           significant digit and 5 the most significant digit.
  4437.  
  4438.           DIGIT NUMBER -------  5  4  3  2  1
  4439.  
  4440.           EXAMPLE CODE% ------  2  1  0  1  6
  4441.  
  4442.           - Digits 1 and 2 set the field type and can be:
  4443.  
  4444.           00  ------ Numeric - no decimal places.
  4445.           01 to 06 - Numeric - 1 to 6 decimal places
  4446.  
  4447.           10 ------- Numeric - no decimal places - padded with leading
  4448.                      zeros.
  4449.           11 to 16 - Numeric - 1 to 6 decimal places - padded with
  4450.                      leading zeros.
  4451.  
  4452.           07 ------- Alpha/numeric
  4453.           17 ------- Alpha/numeric -- UPPER CASE
  4454.           27 ------- Alpha/numeric -- lower case
  4455.  
  4456.           08 ------- Date
  4457.  
  4458.           - Digit 3 sets a protected field ( No entry ) and can be:
  4459.  
  4460.           0 -------- Field is NOT protected.
  4461.           1 -------- Field is protected.
  4462.  
  4463.           - Digit 4 sets an Auto-advance field and can be:
  4464.  
  4465.           0 -------- Field is NOT Auto-advance.
  4466.           1 -------- Field is Auto-advance.
  4467.  
  4468.           - Digit ---- 5 sets an Auto-exit field and can be:
  4469.  
  4470.           0 -------- Field is NOT Auto-exit.
  4471.           1 -------- Field is Auto-exit. ( Always )
  4472.           2 -------- Field is Auto-exit. ( On change only )
  4473.           3 -------- Field is Fixed-choice. ( auto-exit - always )
  4474.  
  4475.           EXAMPLE: IF CODE% = 21016 the field is decimal with padded
  4476.                    zero's, Auto-advance, and Auto-exit ( on change ).
  4477.  
  4478.           NOTE: If digit 3 is set to 1 (protected) digits 4 and 5 are
  4479.                 ignored .
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.                                   65                                  
  4486.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.                                   APPENDIX III
  4496.                                Border Designations
  4497.  
  4498.         DIGIT NUMBER         3    2    1
  4499.         EXAMPLE BORDER%      1    2    1       ( 121 )
  4500.  
  4501.         Digit 1 = Border     Digit 2 = Shadow   Digit 3 = Title Box
  4502.  
  4503.         Example (121) = title box/ left bottom shadow/ single line border
  4504.         ------------------------------------------------------------------
  4505.                     :---Border---:          :------- Shadow -----------:
  4506.           Border    Single  Double   Title  Right   Left    Left  Right
  4507.           Value     Line    Line     Box    Bottom  Bottom  Top   Top
  4508.  
  4509.               0            No border, title box, or shadow
  4510.               1     X
  4511.               2             X
  4512.              10                              X
  4513.              11     X                        X
  4514.              12             X                X
  4515.              20                                     X
  4516.              21     X                               X
  4517.              22             X                       X
  4518.              30                                             X
  4519.              31     X                                       X
  4520.              32             X                               X
  4521.              40                                                    X
  4522.              41     X                                              X
  4523.              42             X                                      X
  4524.  
  4525.             100                       X
  4526.             101     X                 X
  4527.             102             X         X
  4528.             110                       X      X
  4529.             111     X                 X      X
  4530.             112             X         X      X
  4531.             120                       X             X
  4532.             121     X                 X             X
  4533.             122             X         X             X
  4534.             130                       X                     X
  4535.             131     X                 X                     X
  4536.             132             X         X                     X
  4537.             140                       X                            X
  4538.             141     X                 X                            X
  4539.             142             X         X                            X
  4540.           -------------------------------------------------------------------
  4541.           See individual routines for restrictions.
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.                                   66                                  
  4552.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.                                APPENDIX IV
  4562.  
  4563.                            KEYMOUSE CODE VALUES
  4564.  
  4565.           KEYMOUSE%       Key(s)
  4566.  
  4567.           1 to 255        The equivalent key which produces the
  4568.                           corresponding ASCII/IBM code.
  4569.                           ( 65 = A, 66 = B etc. )
  4570.  
  4571.           15104          F1
  4572.           15360          F2
  4573.           15616          F3
  4574.           15872          F4
  4575.           16128          F5
  4576.           16384          F6
  4577.           16640          F7
  4578.           16896          F8
  4579.           17152          F9
  4580.           17408          F10
  4581.           18432          UP ARROW     ( MOUSE UP )
  4582.           20480          DOWN ARROW   ( MOUSE DOWN )
  4583.           19200          LEFT ARROW   ( MOUSE LEFT )
  4584.           19712          RIGHT ARROW  ( MOUSE RIGHT )
  4585.           18688          PGUP
  4586.           20736          PGDN
  4587.           18176          HOME
  4588.           20224          END
  4589.           20992          INSERT
  4590.           21248          DELETE
  4591.           29952          CTRL-END
  4592.           30464          CTRL-HOME
  4593.  
  4594.           NOTE: THIS LIST IS NOT ALL INCLUSIVE.  IT DOES PROVIDE
  4595.           VALUES FOR COMMON KEYS OR KEY COMBINATIONS.
  4596.  
  4597.           To find the values for other keys or key combinations this
  4598.           small program can be used.  Press ESC to end the program.
  4599.  
  4600.           DECLARE FUNCTION KEYMOUSE%
  4601.  
  4602.           GETKEY:
  4603.           A%= KEYMOUSE%
  4604.           PRINT A%
  4605.           IF A% <> 27 THEN GOTO GETKEY
  4606.           END
  4607.  
  4608.           As a key or key combination is pressed the corresponding
  4609.           value will print on the screen.
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.                                   67                                  
  4618.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.                                    RESTRICTIONS
  4628.  
  4629.           ------------------------------------------------------------
  4630.                                UNENHANCED LIBRARY
  4631.                                ------------------
  4632.  
  4633.                    THE UNENHANCED LIBRARY IS OFFERED ON A TRIAL BASIS.
  4634.            IT MAY BE USED FOR EVALUATION.  EXECUTABLE PROGRAMS MADE
  4635.            FROM THE UNENHANCED LIBRARY MAY NOT BE DISTRIBUTED.  IF YOU
  4636.            DECIDE THE ROUTINES ARE USEFUL, REGISTRATION MAY BE
  4637.            ACCOMPLISHED BY VIRTUE OF SECURING THE ENHANCED VERSION.
  4638.            THE UNENHANCED LIBRARY MAY NOT BE ALTERED.  THE UNENHANCED
  4639.            LIBRARY MAY BE DISTRIBUTED, PROVIDED IT IS DISTRIBUTED WITH
  4640.            ALL OF THE FILES INCLUDED IN QWEZ42.ZIP OR PWEZ42.ZIP.
  4641.                   THE FILES, QWEZ42.ZIP OR PWEZ42.ZIP , MAY BE UP-
  4642.            LOADED IN THEIR ENTIRETY TO ANY PUBLIC OR PRIVATE BULLETIN
  4643.            BOARD.  INDIVIDUAL FILES NOT BE UP-LOADED.
  4644.           ------------------------------------------------------------
  4645.                                 ENHANCED VERSION
  4646.                                 -----------------
  4647.  
  4648.                  ALL OF THE SOURCE CODE, OBJECT CODE, AND LIBRARIES
  4649.            INCLUDED IN WINDOWS R-E-Z IS COPYRIGHTED.  COPYING AND
  4650.            DISTRIBUTING ANY OF THE MATERIAL IS PROHIBITED.  PROGRAMS
  4651.            MADE USING ANY OF THE PROCEDURES FROM WINDOWS R-E-Z IN THE
  4652.            EXECUTABLE (.EXE ) FORM MAY BE DISTRIBUTED FREELY BY
  4653.            ORIGINAL PURCHASERS.
  4654.           ------------------------------------------------------------
  4655.                                 COPYRIGHT WARNING
  4656.                                 -----------------
  4657.  
  4658.                  EXTRANEOUS CODE HAS BEEN INSERTED IN THE LIBRARY
  4659.            FILES.   ANY PROGRAM MADE USING THE LIBRARY FILES IS
  4660.            DISTINGUISHABLE AS ORIGINATING FROM WINDOWS R-E-Z.  CONNECT
  4661.            SOFTWARE WILL TAKE APPROPRIATE ACTION IF COPYRIGHT
  4662.            INFRINGEMENT IS DISCOVERED.
  4663.           ------------------------------------------------------------
  4664.                                    DISCLAIMER
  4665.                                    ----------
  4666.  
  4667.               ANY LOSS INCURRED FROM THE USE OF THE PROCEDURES CON-
  4668.           TAINED IN WINDOWS R-E-Z, OR ANY LOSS BELIEVED TO BE CAUSED
  4669.           FROM THE PROCEDURES CONTAINED IN WINDOWS R-E-Z IS NOT THE
  4670.           RESPONSIBILITY OF CONNECT SOFTWARE.  USERS OF WINDOWS R-E-Z
  4671.           ASSUME FULL RESPONSIBILITY FOR THE USE OF ANY PROCEDURES
  4672.           CONTAINED WITHIN.
  4673.           ------------------------------------------------------------
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.                                   68                                  
  4684.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4685.  
  4686.